In web3 wrapper when a response contains an error field we throw this rather than return response.result which is often undefined. In Signature Utils we handle the error thrown when a user rejects the signing dialogue to prevent double signing. Exposed the ZeroExTransaction JSON schema. In Website only use the MetamaskSubprovider if we can detect the provider is Metamask
11 lines
304 B
TypeScript
11 lines
304 B
TypeScript
export const zeroExTransactionSchema = {
|
|
id: '/zeroExTransactionSchema',
|
|
properties: {
|
|
data: { $ref: '/hexSchema' },
|
|
signerAddress: { $ref: '/addressSchema' },
|
|
salt: { $ref: '/numberSchema' },
|
|
},
|
|
required: ['data', 'salt', 'signerAddress'],
|
|
type: 'object',
|
|
};
|