diff options
author | Jacob Evans <jacob@dekz.net> | 2018-08-09 10:24:52 +0800 |
---|---|---|
committer | Jacob Evans <jacob@dekz.net> | 2018-08-11 16:27:21 +0800 |
commit | ca4905c3436931684d113ec66882836a4d0b265b (patch) | |
tree | 75edee08dcef867185a0fec7f590f3f79a601ba2 /packages/contracts/test/exchange/signature_validator.ts | |
parent | 5d4dd406f2946b43377049d7422c72b433bc64ab (diff) | |
download | dexon-sol-tools-ca4905c3436931684d113ec66882836a4d0b265b.tar dexon-sol-tools-ca4905c3436931684d113ec66882836a4d0b265b.tar.gz dexon-sol-tools-ca4905c3436931684d113ec66882836a4d0b265b.tar.bz2 dexon-sol-tools-ca4905c3436931684d113ec66882836a4d0b265b.tar.lz dexon-sol-tools-ca4905c3436931684d113ec66882836a4d0b265b.tar.xz dexon-sol-tools-ca4905c3436931684d113ec66882836a4d0b265b.tar.zst dexon-sol-tools-ca4905c3436931684d113ec66882836a4d0b265b.zip |
Rename from SignerProviderType.EthSign to SignerType.Default
Diffstat (limited to 'packages/contracts/test/exchange/signature_validator.ts')
-rw-r--r-- | packages/contracts/test/exchange/signature_validator.ts | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/packages/contracts/test/exchange/signature_validator.ts b/packages/contracts/test/exchange/signature_validator.ts index 7e9f4fa59..56a06c247 100644 --- a/packages/contracts/test/exchange/signature_validator.ts +++ b/packages/contracts/test/exchange/signature_validator.ts @@ -1,6 +1,6 @@ import { BlockchainLifecycle } from '@0xproject/dev-utils'; import { addSignedMessagePrefix, assetDataUtils, orderHashUtils } from '@0xproject/order-utils'; -import { RevertReason, SignatureType, SignedOrder, SignerProviderType } from '@0xproject/types'; +import { RevertReason, SignatureType, SignedOrder, SignerType } from '@0xproject/types'; import * as chai from 'chai'; import { LogWithDecodedArgs } from 'ethereum-types'; import ethUtil = require('ethereumjs-util'); @@ -213,7 +213,7 @@ describe('MixinSignatureValidator', () => { it('should return true when SignatureType=EthSign and signature is valid', async () => { // Create EthSign signature const orderHashHex = orderHashUtils.getOrderHashHex(signedOrder); - const orderHashWithEthSignPrefixHex = addSignedMessagePrefix(orderHashHex, SignerProviderType.EthSign); + const orderHashWithEthSignPrefixHex = addSignedMessagePrefix(orderHashHex, SignerType.Default); const orderHashWithEthSignPrefixBuffer = ethUtil.toBuffer(orderHashWithEthSignPrefixHex); const ecSignature = ethUtil.ecsign(orderHashWithEthSignPrefixBuffer, signerPrivateKey); // Create 0x signature from EthSign signature @@ -236,7 +236,7 @@ describe('MixinSignatureValidator', () => { it('should return false when SignatureType=EthSign and signature is invalid', async () => { // Create EthSign signature const orderHashHex = orderHashUtils.getOrderHashHex(signedOrder); - const orderHashWithEthSignPrefixHex = addSignedMessagePrefix(orderHashHex, SignerProviderType.EthSign); + const orderHashWithEthSignPrefixHex = addSignedMessagePrefix(orderHashHex, SignerType.Default); const orderHashWithEthSignPrefixBuffer = ethUtil.toBuffer(orderHashWithEthSignPrefixHex); const ecSignature = ethUtil.ecsign(orderHashWithEthSignPrefixBuffer, signerPrivateKey); // Create 0x signature from EthSign signature @@ -385,7 +385,7 @@ describe('MixinSignatureValidator', () => { it('should return true when SignatureType=Trezor and signature is valid', async () => { // Create Trezor signature const orderHashHex = orderHashUtils.getOrderHashHex(signedOrder); - const orderHashWithTrezorPrefixHex = addSignedMessagePrefix(orderHashHex, SignerProviderType.Trezor); + const orderHashWithTrezorPrefixHex = addSignedMessagePrefix(orderHashHex, SignerType.Trezor); const orderHashWithTrezorPrefixBuffer = ethUtil.toBuffer(orderHashWithTrezorPrefixHex); const ecSignature = ethUtil.ecsign(orderHashWithTrezorPrefixBuffer, signerPrivateKey); // Create 0x signature from Trezor signature @@ -408,7 +408,7 @@ describe('MixinSignatureValidator', () => { it('should return false when SignatureType=Trezor and signature is invalid', async () => { // Create Trezor signature const orderHashHex = orderHashUtils.getOrderHashHex(signedOrder); - const orderHashWithTrezorPrefixHex = addSignedMessagePrefix(orderHashHex, SignerProviderType.Trezor); + const orderHashWithTrezorPrefixHex = addSignedMessagePrefix(orderHashHex, SignerType.Trezor); const orderHashWithTrezorPrefixBuffer = ethUtil.toBuffer(orderHashWithTrezorPrefixHex); const ecSignature = ethUtil.ecsign(orderHashWithTrezorPrefixBuffer, signerPrivateKey); // Create 0x signature from Trezor signature |