Skip to content

Commit 85eb672

Browse files
committed
add catcher
1 parent 3724cd3 commit 85eb672

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lib/common/utils/execute.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import {
55
BaseContractMethod,
66
} from 'ethers'
77
import { TransactionResponse } from '@ethersproject/abstract-provider'
8-
import { keys, mergeAll } from 'ramda'
8+
import { always, keys, mergeAll } from 'ramda'
99

1010
import { Positions } from '../../ethereum/s-tokens'
1111
import { Rewards } from '../../ethereum/s-tokens/rewards'
@@ -147,7 +147,9 @@ export const execute: ExecuteFunction = async <
147147
) => {
148148
const signer =
149149
typeof (opts.contract?.runner as BrowserProvider)?.getSigner === 'function'
150-
? await (opts.contract.runner as BrowserProvider).getSigner()
150+
? await (opts.contract.runner as BrowserProvider)
151+
.getSigner()
152+
.catch(always(undefined))
151153
: undefined
152154
const contract =
153155
opts.mutation && signer

0 commit comments

Comments
 (0)