Skip to content
This repository has been archived by the owner on Jul 9, 2021. It is now read-only.

Support EIP1193 provider interface #1627

Merged
merged 37 commits into from
Feb 22, 2019
Merged

Conversation

fabioberger
Copy link
Contributor

@fabioberger fabioberger commented Feb 20, 2019

Description

This PR adds support for EIP 1193 & [email protected] providers and transforms supplied providers into a consistent internal provider interface.

Testing instructions

Types of changes

Checklist:

  • Prefix PR title with [WIP] if necessary.
  • Add tests to cover changes as needed.
  • Update documentation as needed.
  • Add new entries to the relevant CHANGELOG.jsons.

@coveralls
Copy link

coveralls commented Feb 20, 2019

Coverage Status

Coverage decreased (-0.006%) to 85.397% when pulling b51038b on supportEIP1193Providers into 6bcc206 on development.

@fabioberger fabioberger changed the title [WIP] Support EIP1193 provider interface Support EIP1193 provider interface Feb 20, 2019
* development: (37 commits)
  Factor out redundant source param in parse order functions
  Fix marquee typo
  Throw error if cannot find error in table
  Integrate one-time dump and API for nonfungible.com (#1603)
  Change optional text props to mandatory in LedgerSignNote
  Add radar_orders parseRadarOrder test
  Add parser test for Radar orderbook parsing
  Moved calculateSlippage from parsers to transformers
  Show greater than less than when minority has a vote
  Prettier
  Recieved -> Received
  Fix style for address table
  Hide ledger sign note on error
  Revert broken formatting
  Added ledger sign notification
  Fix bug in ledger address selector where provider does not exist.
  fix null column constraint issue
  Add parsing radar order test
  Rename migration to what it is called on prod and qa
  Fix type bug around Radar response
  ...
Copy link
Contributor

@LogvinovLeon LogvinovLeon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall - looks great. But I would argue that even though technically it's not a breaking change in code functionality - it's a change at a core of a public API that changes types and type names so it should be a major version bump.

@@ -59,6 +59,7 @@ export const assert = {
isBoolean(variableName: string, value: boolean): void {
assert.assert(_.isBoolean(value), assert.typeAssertionMessage(variableName, 'boolean', value));
},
// DEPRECATED: Please use providerUtils.standardizeOrThrow() instead
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comment will live here forever and no one will ever see it. Can we use logUtils.warn instead?

@@ -154,18 +154,6 @@ describe('Assertions', () => {
invalidInputs.forEach(input => expect(assert.isBoolean.bind(assert, variableName, input)).to.throw());
});
});
describe('#isWeb3Provider', () => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's live it here before we remove the code.

* development:
  Add constraint name to down phase as well
  Give the constraint an explicit name of token_orderbook_snapshots_pkey
  Remove comments
  Fix inconsistently named constraint
packages/asset-buyer/src/asset_buyer.ts Show resolved Hide resolved
packages/ethereum-types/src/index.ts Show resolved Hide resolved
packages/migrations/src/migration.ts Outdated Show resolved Hide resolved
packages/web3-wrapper/src/web3_wrapper.ts Outdated Show resolved Hide resolved
* development:
  Demonstrate calling contracts with tuple arrays (#1615)
  removed default meta tags in public/index.html
  fixed linting issue
  updated documentTitle component
  added metadata for pages (incomplete)
  fixed title comment-out
  removed react-document-title in favor of using react-helmet for consistency and bug fix
@fabioberger fabioberger merged commit 78da033 into development Feb 22, 2019
@fabioberger fabioberger deleted the supportEIP1193Providers branch February 22, 2019 04:26
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants