Add network request getContractVersion within gnosis signing hooks to get the contract version of a safe
This contract version is sent to the signatures/gnosisTransaction.ts file to conditionally include chainId in the signature's domain
Added intentional check for gnosis API return values having error codes and throwing clearer messages if they do
Motivation & Context
Different safe versions can have different signature schemas. v1.3.0 introduced chainId to the signature domain, which means that we have to make our signature domains conditional on the type of safe to not include it if the version is less than 1.3.0.
Steps to test
Queue a transaction on a safe version <1.3.0 (our Station Labs safe on mainnet is 1.1.1). Mind queued one here
Queue a transaction on a safe version >=1.3.0 (all new safes are this)
What's included in this pr + description
getContractVersion
within gnosis signing hooks to get the contract version of a safesignatures/gnosisTransaction.ts
file to conditionally includechainId
in the signature's domainMotivation & Context
chainId
to the signature domain, which means that we have to make our signature domains conditional on the type of safe to not include it if the version is less than 1.3.0.Steps to test