Skip to content

Commit

Permalink
fix: properly handle xdefi wallet pairing error
Browse files Browse the repository at this point in the history
  • Loading branch information
pastaghost committed Jul 12, 2022
1 parent a5a2b66 commit 9fdedd0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions integration/src/wallets/xdefi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,10 @@ export async function createWallet(): Promise<core.HDWallet> {
const adapter = xdefi.XDEFIAdapter.useKeyring(new core.Keyring());
const wallet = await adapter.pairDevice();

if (!wallet) {
throw new Error("Unable to pair XDEFIWallet!");
}

wallet.ethSignTx = jest
.fn()
.mockReturnValueOnce(mockSignEthTxResponse)
Expand Down

0 comments on commit 9fdedd0

Please sign in to comment.