Skip to content

Commit 0615f25

Browse files
committed
Merge branch 'feat/zilswap-v2' of https://github.com/switcheo/zilswap-sdk into feat/zilswap-v2
2 parents ec43670 + 9aef6cc commit 0615f25

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/zilswap-v2/ZilSwapV2.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
1+
<<<<<<< HEAD
12
import { Transaction, TxReceipt as _TxReceipt, TxStatus as _TxStatus, Wallet } from '@zilliqa-js/account'
23
import { CallParams, Contract, Value } from '@zilliqa-js/contract'
34
import { Provider } from '@zilliqa-js/core'
5+
=======
6+
import { Transaction, TxReceipt as _TxReceipt, Wallet, TxStatus as _TxStatus } from '@zilliqa-js/account'
7+
import { CallParams, Contract, Value } from '@zilliqa-js/contract'
8+
import { TransactionError, Provider } from '@zilliqa-js/core'
9+
>>>>>>> 9aef6cc41b5ba83143da23ec31e29ffbd353d2f0
410
import { fromBech32Address, toBech32Address } from '@zilliqa-js/crypto'
511
import { MessageType, NewEventSubscription, StatusType } from '@zilliqa-js/subscriptions'
612
import { BN, Long, units } from '@zilliqa-js/util'
@@ -1760,7 +1766,10 @@ export class ZilSwapV2 {
17601766
tx = await this.zilliqa.blockchain.createTransactionWithoutConfirm(transaction);
17611767
}
17621768

1763-
console.log("obv tx", tx)
1769+
if (tx.isRejected()) {
1770+
throw new Error('Submitted transaction was rejected.')
1771+
}
1772+
17641773
const observeTxn = {
17651774
hash: tx.id!,
17661775
deadline,

0 commit comments

Comments
 (0)