-
Notifications
You must be signed in to change notification settings - Fork 465
Portal Ledger Support, Lazy-loading token balances/allowances #351
Conversation
…port * feature/addSubproviders: Standardize deps Inline function Introduce a const Make private Add version matcher script Use same versions of dependencies everywhere Add missing await Move declaration into proper conditional block Fix Party element so that an identicon's height is that which was passed in
…port * feature/addSubproviders: remove unneeded reset Use rejectedWith Add missing calls to configure remove unneeded type assertions remove unused type Simplify interface to signPersonalMessageAsync Fix unit test Fix ethereumjs-tx declaration and import Use assert.isHexString Add type defs for ledgerco and ethereumjs-tx Make test only run unit tests since cannot run integration tests on CI Improve README Fix version and remove the UMD build Fix tslint error
…port * feature/addSubproviders: Make sure we don't pass empty maker into getOrderHashHex Make sure we always pass in the correct networkId even if no injectedWeb3 found
…port * feature/addSubproviders: remove console.log Update README.md Fix unit test Add missing params Debug CircleCi failure Update yarn.lock Inline network module Add todo Stop supporting different file extensions in abi-gen Refactor networkId out of web3Wrapper Update connect types in preperation for publishing Add link to random id generator Remove `prebuild` command and add `test:circleci` Fix CI command Address feedback Refactor web3Wrapper to a separate package
…ow enforces HSTS by default
* development: (437 commits) Publish Update yarn.lock Update the CHANGELOG Fix the bug making it impossible to specify the custom ZRX address Fix fill/cancel order by looking for NoError instead of empty blockchainErr given the BlockchainErrs type refactor Add a comment about a yarn bug Add our mainnet and kovan nodes as backups for Portal requests Fix bug hiding the user info from topBar Add dev-utils package to top level README Prettier newline Prettier Allow Token symbols to be alphanumeric Update CHANGELOG, rebase on development Should not -> cannot Reject negative amounts in isValidBaseUnitAmount Re-add changelog for 0x.js Fix prettier Update yarn.lock Move tests to a separate folder Change file layout ... # Conflicts: # packages/website/README.md
…rst switching back to an injected provider
…o Ledger network dropdown
…or all transactions
* development: Publish Add PR number Add config file specifically in prettier command and fix files Fix prettier Fix prettier Add shouldAddPersonalMessagePrefix param to signOrderHashAsync instead of trying to infer whether to add it or not from the nodeVersion Publish Move @0xproject/types to dependencies Updated web3-typescript-typings changelog Fixed getTransactionReceipt not returning null Run prettier Update changelog Add Rinkeby addresses to artifacts Fix bad merge on package.json Respond to GH comments and add /info endpoint Change package name to @0xproject/testnet-faucets Implement testnet faucets for any testnet available via infura Rename to testnet-faucets Add to the Pull Request Template Create an ISSUE TEMPLATE
…r append it for Ledger. This fixes signing when Ledger is used and the backing node is not Parity
…own flag rather then using a cancellablePromise since there was little to be gained from this alternative
* development: Prettierignore package.json Enable solidity syntax highlighting
Can we use .local? |
packages/website/package.json
Outdated
"update_contracts": "for i in ${npm_package_config_artifacts}; do copyfiles -u 4 ../contracts/build/contracts/$i.json ../website/contracts; done;", | ||
"deploy_staging": "npm run build; aws s3 sync ./public/. s3://staging-0xproject --profile 0xproject --region us-east-1 --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers", | ||
"deploy_live": "npm run build; aws s3 sync ./public/. s3://0xproject.com --profile 0xproject --region us-east-1 --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers" | ||
"update_contracts": |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please undo those changes
packages/website/ts/blockchain.ts
Outdated
@@ -121,6 +123,9 @@ export class Blockchain { | |||
constructor(dispatcher: Dispatcher, isSalePage: boolean = false) { | |||
this._dispatcher = dispatcher; | |||
this._userAddress = ''; | |||
this._defaultGasPrice = new BigNumber(30000000000); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we use ZeroEx.toBaseUnitAmount? It's unclear if that's 3 Gwei or 0.3 Gwei or 30 GWei
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
toBaseUnitAmount
goes from unit amount to baseUnit, i.e Ether to Wei. If we go from gwei to wei, it's also weird because the assumption is we are passing in the unit amount, not some other intermediary unit. I'll use a named constant to make this more readable.
Something like:
30 * GWEI_IN_WEI
packages/website/ts/blockchain.ts
Outdated
@@ -121,6 +123,9 @@ export class Blockchain { | |||
constructor(dispatcher: Dispatcher, isSalePage: boolean = false) { | |||
this._dispatcher = dispatcher; | |||
this._userAddress = ''; | |||
this._defaultGasPrice = new BigNumber(30000000000); | |||
// tslint:disable-next-line:no-floating-promises | |||
this._updateDefaultGasPriceAsync(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FireAndForget?
@@ -184,6 +202,8 @@ export class LedgerConfigDialog extends React.Component<LedgerConfigDialogProps, | |||
const selectAddressBalance = this.state.addressBalances[selectedRowIndex]; | |||
this.props.dispatcher.updateUserAddress(selectedAddress); | |||
this.props.blockchain.updateWeb3WrapperPrevUserAddress(selectedAddress); | |||
// tslint:disable-next-line:no-floating-promises | |||
this.props.blockchain.fetchTokenInformationAsync(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FireAndForget?
This PR:
0xproject.localhost
since.dev
is owned by Google and chrome complains about missing certs.