Class: StellarBase::DepositRequests::Trigger

Inherits:
Object
  • Object
show all
Extended by:
LightService::Organizer
Defined in:
app/services/stellar_base/deposit_requests/trigger.rb

Class Method Summary collapse

Class Method Details

.actionsObject



25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# File 'app/services/stellar_base/deposit_requests/trigger.rb', line 25

def self.actions
  [
    FindConfig,
    FindDepositRequest,
    CreateDeposit,
    InitAssetSendingClient,
    InitStellarIssuerAccount,
    InitStellarRecipientAccount,
    InitStellarDistributionAccount,
    InitStellarAsset,
    InitStellarAmount,
    SendAsset,
    UpdateDeposit,
  ]
end

.call(network, deposit_address, tx_id, amount, horizon_url: StellarBase.configuration.horizon_url, sending_strategy: StellarBase.configuration.sending_strategy) ⇒ Object



7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# File 'app/services/stellar_base/deposit_requests/trigger.rb', line 7

def self.call(
  network,
  deposit_address,
  tx_id,
  amount,
  horizon_url: StellarBase.configuration.horizon_url,
  sending_strategy: StellarBase.configuration.sending_strategy
)
  with(
    network: network,
    deposit_address: deposit_address,
    tx_id: tx_id,
    amount: amount,
    horizon_url: horizon_url,
    sending_strategy: sending_strategy,
  ).reduce(actions)
end