Skip to content

Commit

Permalink
⛽ Settle safeTxGas (#1139)
Browse files Browse the repository at this point in the history
  • Loading branch information
akoszowski committed Sep 4, 2023
1 parent 95ed92f commit a02c280
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/core/src/helpers/gnosisSafeUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,11 @@ export const calculateSafeTransactionHash = (
safeTx: SafeTransaction,
chainId: BigNumberish
): string => {
// TODO: Remove after WalletConnectV2 fix
// WalletConnectV2 incorrectly passes safeTxGas value, equal 0 (default value).
// Thus we have a mismatch between gnosis safeTxHash and one calculated by useDApp (safeTxGas is based on estimation)
safeTx = { ...safeTx, safeTxGas: 0 }

return utils._TypedDataEncoder.hash({ verifyingContract: safe.address, chainId }, EIP712_SAFE_TX_TYPE, safeTx)
}

Expand Down

3 comments on commit a02c280

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.