29 Commits

Author SHA1 Message Date
Jacob Evans
9f924e459c
chore: change package org from 0xproject to 0x 2018-10-18 22:27:31 +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
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
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
Amir Bandeali
0629a7d143 Remove remaining Trezor references 2018-08-24 14:40:00 -07:00
Amir Bandeali
1932aff35c Remove Trezor SignatureType 2018-08-24 14:40:00 -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
ca4905c343
Rename from SignerProviderType.EthSign to SignerType.Default 2018-08-11 18:27:21 +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
Alex Browne
6a5965d73b
Add strictArgumentEncodingCheck to BaseContract and use it in contract templates 2018-08-08 14:27:30 -07: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
Alex Browne
4012e31115
Use make-promises-safe as a preloader instead of manually importing 2018-06-21 19:17:33 -07:00
fragosti
9778695b4a Try enabling no-unused-variable... 2018-06-04 19:48:21 -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
152082e182 Fix TODOs 2018-05-31 21:32:20 -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
aa997f1be5 Move isValidOrderHash to the order_hash_test file 2018-05-30 17:55:16 -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
Fabio Berger
cc840a6911
Merge pull request #594 from 0xProject/improvement/addCustomTslintRules
Add more tslint rules
2018-05-22 18:04:50 +02:00
Alex Browne
251218af8b
Use make-promises-safe to catch unhandled rejections in tests 2018-05-16 17:36:37 -07:00
Fabio Berger
839db68571 Fix TSLint rules 2018-05-16 14:59:10 +02:00
Leonid Logvinov
b74957acdf
Add missing type definitions 2018-05-14 10:35:13 +02:00
Leonid Logvinov
3585326d7e
Fix signature utils tests 2018-05-02 19:30:32 +03:00
Leonid Logvinov
0499541e11
Move order utils to @0xproject/order-utils 2018-05-02 15:10:24 +03:00