Skip to content

Commit afa66f7

Browse files
committed
Be more resilient against missing exchange rates for airdrops
1 parent 8a8a200 commit afa66f7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/code/async/airdrop/transaction.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ func (p *service) watchTxn(ctx context.Context, sig string) (*solana.ConfirmedTr
204204
}
205205

206206
func (p *service) onSuccess(ctx context.Context, txn *solana.ConfirmedTransaction, amount uint64, owners ...*common.Account) error {
207-
var usdMarketValue float64
207+
usdMarketValue := 0.001
208208
usdExchangeRateRecord, err := p.data.GetExchangeRate(ctx, currency.USD, *txn.BlockTime)
209209
if err == nil {
210210
usdMarketValue = usdExchangeRateRecord.Rate * float64(amount)

0 commit comments

Comments
 (0)