Skip to content

EcashSendOperationLike.awaitFinal ​

ts
awaitFinal(): Promise<EcashSendState>

Waits for the final state of the operation.

Parameters. None.

Returns. EcashSendState. The final state. A failed payment resolves with a failure state.

Throws. Storage, FederationClosed, Internal. FederationClosed means the federation closed while the operation was pending.

Example

example.ts
ts
import {
  EcashSendState,
  type EcashSendOperationLike,
} from '@fedimint/react-native'

declare const operation: EcashSendOperationLike

const final = await operation.awaitFinal() 
console.log(final === EcashSendState.Redeemed ? 'redeemed' : 'canceled')

Used in. Send, step 03, Send, step 05, Receive, step 02, Restore, step 03