Commit Graph

46 Commits

Author SHA1 Message Date
Fabio Berger
26e17074c2 Fix linter issues 2019-02-19 23:09:26 -08:00
Fabio Berger
6b775628d5 Prettier fixes 2019-02-19 22:48:09 -08:00
Fabio Berger
98236736e0 Fix remaining Provider to SupportedProvider type 2019-02-19 15:25:47 -08:00
Fabio Berger
5db20bbbe8 Add support for EIP1193 providers and clean up provider standardization logic 2019-02-18 15:12:29 -08:00
Fabio Berger
c03e24e10b Fix bug where passing in signerAddress instead of exchangeAddress 2019-02-04 16:03:25 +00:00
Fabio Berger
8fd7a9e1f5 Actually pass the signature, not the signature index to a wallet contract's isValidSignature call 2018-12-10 15:31:59 -08:00
Jacob Evans
9f924e459c chore: change package org from 0xproject to 0x 2018-10-18 22:27:31 +11:00
Alex Browne
57d9fcf9e5 update order-utils to use new artifacts and abi-gen wrappers packages 2018-10-15 13:36:59 -07:00
Jacob Evans
75b9e63919 Move Metamask Error to OrderErrors 2018-10-09 20:58:30 +11:00
Jacob Evans
9e8031d5e3 Throw and handle errors from Providers.
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
2018-10-09 19:01:36 +11:00
Jacob Evans
e1236a4846 Detect MM on signature validation failure.
Report a developer friendly error in this event to educate them on the compatability wrapper MetamaskSubprovider
2018-10-08 11:13:04 +11:00
Jacob Evans
75d274f330 Return SignedOrder from signing utils.
Create a helper back in EIP712Utils for code cleanup.
Moved constants in order-utils into the constants object
2018-10-05 17:12:17 +10:00
Jacob Evans
2a82ff48c0 Move SignTypedData to utils package 2018-10-05 12:00:41 +10:00
Jacob Evans
07926ded6e Introduce Metamask Subprovider.
MM has a number of inconsistencies with other providers when implementing the JSON RPC interface. This subprovider wraps those nuances so they do not leak into the rest of our code
2018-10-05 12:00:41 +10:00
Jacob Evans
adcfaa2e80 Expose eth_signTypedData functionality for order signing 2018-10-05 11:59:24 +10:00
Fabio Berger
0591f1d32a Add address normalization to isValidECSignature method 2018-09-27 10:03:54 +01:00
Amir Bandeali
0629a7d143 Remove remaining Trezor references 2018-08-24 14:40:00 -07:00
Greg Hysen
d039a1adda Fixed linter in signatureUtils 2018-08-24 14:40:00 -07:00
Greg Hysen
241534a63d Fixed trezor personal message in client+contracts; added a test using message signed by Trezor One (firmware v1.6.2) 2018-08-24 14:40:00 -07:00
Amir Bandeali
1932aff35c Remove Trezor SignatureType 2018-08-24 14:40:00 -07:00
Amir Bandeali
4f27991959 Remove SigntureType.Caller from signingUtils 2018-08-24 14:39:08 -07:00
Fabio Berger
1d9408a8e0 Fix additional merge conflicts 2018-08-14 14:39:59 -07:00
Fabio Berger
2f2582a0da Merge development 2018-08-14 14:21:47 -07:00
Jacob Evans
a351757493 Update version numbers.
Add source for Metamask future fix.
Consolidate switch statement to one return
2018-08-14 09:18:13 +10:00
Jacob Evans
ca4905c343 Rename from SignerProviderType.EthSign to SignerType.Default 2018-08-11 18:27:21 +10:00
Jacob Evans
5d4dd406f2 Update Changelogs. Rebased from development 2018-08-09 12:05:17 +10:00
Jacob Evans
9dd6ba7825 Update jsdoc 2018-08-09 12:02:17 +10:00
Jacob Evans
45e9fbe8f9 Introduce SignerProviderType
This allows the developer to indicate the nuanced signer provider. Some have different implementations (trezor, ledger) and others have different implementations (metamask). Breaking the abstraction of eth_sign. EthSign assumes a spec compliant implementation and can be used as a default
2018-08-09 12:02:12 +10:00
Fabio Berger
d85ce6ac75 Make signature_util into an object literal so related functions are rendered together in the docs 2018-08-03 17:15:14 +02:00
Fabio Berger
d8678d562d Add assertions to SignatureUtils exported methods 2018-07-12 15:22:21 +02:00
Greg Hysen
94e260cec6 Fixed how trezor messages are signed in signature_utils. Now uses byteLength instead of length. 2018-06-20 13:54:39 -07:00
Fabio Berger
21f7722f10 Move OrderValidationUtils (+ tests) and ExchangeTransferSimulator to order-utils 2018-06-11 19:21:32 +02:00
fragosti
9778695b4a Try enabling no-unused-variable... 2018-06-04 19:48:21 -07:00
Fabio Berger
7024a7468a Improve comments and remove unused imports 2018-06-01 17:02:54 -07:00
Fabio Berger
7ab80f01b5 Add comment to exported method 2018-06-01 14:09:47 -07:00
Fabio Berger
94b9d5644c Fix type imports 2018-06-01 13:33:46 -07:00
Fabio Berger
8cd4578d83 Add signature specific validation methods, and other refactors 2018-06-01 11:34:12 -07:00
Fabio Berger
719c432ca8 Rename ISigner to IWallet and implement SignatureType.Validator 2018-05-31 21:23:08 -07:00
Fabio Berger
94ee82e076 Merge branch 'v2-prototype' into refactor/order-utils/for-v2
* v2-prototype: (45 commits)
  Check length before accessing indices, add awaitTransactionSuccess where needed, and rename function
  Add back before/after snapshots for each test
  Rename Signer to Wallet, rename GAS_ESTIMATE to GAS_LIMIT
  Make preSigned and allowedValidators mappings public
  Change names of signature types
  Fix formatting and tests
  Make AssetProxyId last byte of assetData
  Add signer to txHash, allow approveValidator to be used with executeTransaction
  Update Whitelist
  Fix Exchange interface
  Increase block gas limit
  Use last byte of signature as signature type
  Remove TxOrigin signature type, modify whitelist to use Validator signature type
  Update Whitelist contract with comments, also require maker to be whitelisted
  Fix build
  Add example whitelist contract and minimum tests
  Add sample whitelist contract
  Add TxOrigin signature type and rearrange order of types
  Add approveValidator function
  Add Validator signature type
  ...

# Conflicts:
#	packages/contracts/src/contracts/current/protocol/Exchange/MixinSignatureValidator.sol
#	packages/contracts/src/utils/types.ts
#	packages/contracts/test/exchange/transactions.ts
#	packages/order-utils/src/asset_proxy_utils.ts
2018-05-31 10:45:34 -07:00
Fabio Berger
0beab9eec4 Expose isValidPresignedSignatureAsync method 2018-05-30 17:55:33 -07:00
Fabio Berger
4eb58a70bb Decide to throw for Caller signature type for now 2018-05-30 17:54:59 -07:00
Fabio Berger
32833b7301 Fix order-utils tests 2018-05-30 14:08:43 -07:00
Fabio Berger
4874d55d03 Initial refactor of order-utils. Move many utils from contracts into this package. 2018-05-29 16:58:30 -07:00
Alex Browne
e7e8773cd4 Fix small bug in order-utils 2018-05-22 18:14:23 -07:00
Fabio Berger
839db68571 Fix TSLint rules 2018-05-16 14:59:10 +02:00
Leonid Logvinov
0499541e11 Move order utils to @0xproject/order-utils 2018-05-02 15:10:24 +03:00