alexx876

Untitled

Nov 11th, 2022
939
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const result = await this.connection.getSignatureStatus(txId, {
  2.             searchTransactionHistory: true
  3.           })
  4.           const status = result.value
  5.  
  6.           if (!status) {
  7.             if (iteration >= 200) {
  8.               throw new Error(this.$t('user.dashboard.wallet.swap.unknown_error'))
  9.             }
  10.           } else if (status.err) {
  11.             this.onTransactionError(txId, status.err)
  12.           } else if (!status.confirmations && status.confirmationStatus !== 'finalized') {
  13.           } else {
  14.             done = true
  15.           }
  16.           await sleep(2000)
  17.           iteration++
Advertisement
Add Comment
Please, Sign In to add comment