File tree 4 files changed +5
-3
lines changed
4 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ import { clearWallets } from './store/wallet';
18
18
import { clearPorticoBridge } from 'store/porticoBridge' ;
19
19
import { useExternalSearch } from 'hooks/useExternalSearch' ;
20
20
import { clearNtt } from 'store/ntt' ;
21
+ import { wh } from 'utils/sdk' ;
21
22
22
23
const useStyles = makeStyles ( ) ( ( theme : any ) => ( {
23
24
appContent : {
@@ -55,6 +56,7 @@ function AppRouter() {
55
56
dispatch ( clearRedeem ( ) ) ;
56
57
dispatch ( clearWallets ( ) ) ;
57
58
dispatch ( clearNtt ( ) ) ;
59
+ wh . registerProviders ( ) ; // reset any providers that may have been set (e.g. signer.provider)
58
60
}
59
61
// reset transfer state on leave
60
62
if ( prevRoute === bridgeRoute && route !== bridgeRoute ) {
Original file line number Diff line number Diff line change @@ -107,12 +107,12 @@ function Send(props: { valid: boolean }) {
107
107
try {
108
108
const fromConfig = CHAINS [ fromChain ! ] ;
109
109
if ( fromConfig ?. context === Context . ETH ) {
110
- registerWalletSigner ( fromChain ! , TransferWallet . SENDING ) ;
111
110
const chainId = fromConfig . chainId ;
112
111
if ( typeof chainId !== 'number' ) {
113
112
throw new Error ( 'invalid evm chain ID' ) ;
114
113
}
115
114
await switchChain ( chainId , TransferWallet . SENDING ) ;
115
+ registerWalletSigner ( fromChain ! , TransferWallet . SENDING ) ;
116
116
}
117
117
if ( fromConfig ?. context === Context . COSMOS ) {
118
118
await switchChain ( fromConfig . chainId , TransferWallet . SENDING ) ;
Original file line number Diff line number Diff line change @@ -97,8 +97,8 @@ const NttInboundQueued = () => {
97
97
try {
98
98
const toConfig = CHAINS [ toChain ] ;
99
99
if ( toConfig ?. context === Context . ETH ) {
100
- registerWalletSigner ( toChain , TransferWallet . RECEIVING ) ;
101
100
await switchChain ( toConfig . chainId , TransferWallet . RECEIVING ) ;
101
+ registerWalletSigner ( toChain , TransferWallet . RECEIVING ) ;
102
102
}
103
103
tx = await nttRoute . completeInboundQueuedTransfer (
104
104
toChain ,
Original file line number Diff line number Diff line change @@ -201,8 +201,8 @@ function SendTo() {
201
201
chainConfig ! . context === Context . ETH &&
202
202
typeof chainConfig . chainId === 'number'
203
203
) {
204
- registerWalletSigner ( txData . toChain , TransferWallet . RECEIVING ) ;
205
204
await switchChain ( chainConfig . chainId , TransferWallet . RECEIVING ) ;
205
+ registerWalletSigner ( txData . toChain , TransferWallet . RECEIVING ) ;
206
206
}
207
207
if ( ! signedMessage ) {
208
208
throw new Error ( 'failed to get vaa, cannot redeem' ) ;
You can’t perform that action at this time.
0 commit comments