diff options
author | Jacob Evans <jacob@dekz.net> | 2018-08-03 11:35:03 +0800 |
---|---|---|
committer | Jacob Evans <jacob@dekz.net> | 2018-08-09 10:02:17 +0800 |
commit | 9dd6ba78250d8bbde1d5023ce4ac4254884f4115 (patch) | |
tree | aef5c874cad0f67da799377bed35e3dd25dd825a /packages/order-utils | |
parent | 45e9fbe8f93f68f3786629fff1861b1a66b90635 (diff) | |
download | dexon-sol-tools-9dd6ba78250d8bbde1d5023ce4ac4254884f4115.tar dexon-sol-tools-9dd6ba78250d8bbde1d5023ce4ac4254884f4115.tar.gz dexon-sol-tools-9dd6ba78250d8bbde1d5023ce4ac4254884f4115.tar.bz2 dexon-sol-tools-9dd6ba78250d8bbde1d5023ce4ac4254884f4115.tar.lz dexon-sol-tools-9dd6ba78250d8bbde1d5023ce4ac4254884f4115.tar.xz dexon-sol-tools-9dd6ba78250d8bbde1d5023ce4ac4254884f4115.tar.zst dexon-sol-tools-9dd6ba78250d8bbde1d5023ce4ac4254884f4115.zip |
Update jsdoc
Diffstat (limited to 'packages/order-utils')
-rw-r--r-- | packages/order-utils/src/signature_utils.ts | 9 | ||||
-rw-r--r-- | packages/order-utils/test/signature_utils_test.ts | 1 |
2 files changed, 5 insertions, 5 deletions
diff --git a/packages/order-utils/src/signature_utils.ts b/packages/order-utils/src/signature_utils.ts index 3237259c9..07644ebe2 100644 --- a/packages/order-utils/src/signature_utils.ts +++ b/packages/order-utils/src/signature_utils.ts @@ -196,9 +196,8 @@ export function isValidECSignature(data: string, signature: ECSignature, signerA * @param orderHash Hex encoded orderHash to sign. * @param signerAddress The hex encoded Ethereum address you wish to sign it with. This address * must be available via the Provider supplied to 0x.js. - * @param messagePrefixOpts Different signers add/require different prefixes be prepended to the message being signed. - * Since we cannot know ahead of time which signer you are using, you must supply both a prefixType and - * whether it must be added before calling `eth_sign` (some signers add it themselves) + * @param signerProviderType Different signers add/require different prefixes to be prepended to the message being signed. + * Since we cannot know ahead of time which signer you are using, you must supply a SignerProviderType. * @return A hex encoded string containing the Elliptic curve signature generated by signing the orderHash and the Signature Type. */ export async function ecSignOrderHashAsync( @@ -251,7 +250,7 @@ export async function ecSignOrderHashAsync( /** * Combines ECSignature with V,R,S and the relevant signature type for use in 0x protocol * @param ecSignature The ECSignature of the signed data - * @param messagePrefixType The MessagePrefixType of the signed data + * @param signerProviderType The SignerProviderType of the signed data * @return Hex encoded string of signature with Signature Type */ export function convertECSignatureToSignatureHex( @@ -283,7 +282,7 @@ export function convertToSignatureWithType(signature: string, type: SignatureTyp /** * Adds the relevant prefix to the message being signed. * @param message Message to sign - * @param messagePrefixType The type of message prefix to add. Different signers expect + * @param signerProviderType The type of message prefix to add for a given SignerProviderType. Different signers expect * specific message prefixes. * @return Prefixed message */ diff --git a/packages/order-utils/test/signature_utils_test.ts b/packages/order-utils/test/signature_utils_test.ts index 179905b18..de76e82ac 100644 --- a/packages/order-utils/test/signature_utils_test.ts +++ b/packages/order-utils/test/signature_utils_test.ts @@ -192,6 +192,7 @@ describe('Signature utils', () => { expect(ecSignature).to.equal(expectedSignature); }); // Note this is due to a bug in Metamask where it does not prefix before signing, this is a known issue and is to be fixed in the future + // Source: https://github.com/MetaMask/metamask-extension/commit/a9d36860bec424dcee8db043d3e7da6a5ff5672e it('should receive a payload modified with a prefix when Metamask is SignerProviderType', async () => { const orderHash = '0x34decbedc118904df65f379a175bb39ca18209d6ce41d5ed549d54e6e0a95004'; const orderHashPrefixed = '0xae70f31d26096291aa681b26cb7574563956221d0b4213631e1ef9df675d4cba'; |