0x created an Instant exchange relayer. I made a React component for it
Switch branches/tags
Nothing to show
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
lib adding props for fees and relayer Dec 7, 2018
src adding props for fees and relayer Dec 7, 2018
.gitignore first commit Dec 7, 2018
LICENSE Create License Dec 7, 2018
README.md I should preview before I commit Dec 7, 2018
babel.config.js first commit Dec 7, 2018
package-lock.json first commit Dec 7, 2018
package.json first commit Dec 7, 2018

README.md

0x-instant-component

A plug and play 0x Instant component.

TODO

Add props for supported tokens

Add props for fees

⭕ Maybe find a better way to inject script

Usage

npm install 0x-instant-component

The component will take 3 optional props

  • source: currently takes either "radar" or "bamboo". All other inputs will default to radar.
  • fee: takes a string value of your fee percentage. This must be within the range of 0 < fee <= 0.05.
  • feeAddress: takes an Ethereum address. Right now all it checks for is being defined. //TODO enforce hex address

Example bare bones App.js:

import React, { Component } from 'react';
import Instant from '0x-instant-component';

class App extends Component {
  render() {
    return (
      <div>
        <Instant />
      </div>
    );
  }
}

export default App;

Example with props:

import React, { Component } from 'react';
import Instant from '0x-instant-component';

class App extends Component {
  render() {
    return (
      <div>
        <Instant fee='0.04' feeAddress="0x23f9b9985bc838c5ad196b91e202794308a9fb40" source="bamboo"/>
      </div>
    );
  }
}

export default App;