Skip to content

Commit

Permalink
fix(suite): evm bump fee ts5
Browse files Browse the repository at this point in the history
  • Loading branch information
tomasklim committed Jul 1, 2024
1 parent c00e047 commit 77cf3dd
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions packages/suite/src/middlewares/suite/buttonRequestMiddleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ const buttonRequest =

// firmware bug https://github.com/trezor/trezor-firmware/issues/35
// ugly hack to make Cardano review modal work
// ugly hack to make Ethereum staking and bump fee review modal on specific devices work
// root cause of this bug is wrong button request ButtonRequest_Other from CardanoSignTx - should be ButtonRequest_SignTx
if (action.type === UI.REQUEST_BUTTON && action.payload.code === 'ButtonRequest_Other') {
const {
Expand All @@ -46,15 +47,16 @@ const buttonRequest =
},
router: { route },
} = api.getState();
if (account?.networkType === 'cardano' || account?.networkType === 'ethereum') {
if (route?.name === 'wallet-send' || route?.name === 'wallet-staking') {
api.dispatch({
...action,
payload: { ...action.payload, code: 'ButtonRequest_SignTx' },
});
if (
['cardano', 'ethereum'].includes(account?.networkType || '') &&
['wallet-send', 'wallet-staking', 'wallet-index'].includes(route?.name || '')
) {
api.dispatch({
...action,
payload: { ...action.payload, code: 'ButtonRequest_SignTx' },
});

return action;
}
return action;
}
}

Expand Down

0 comments on commit 77cf3dd

Please sign in to comment.