-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bity.com crypto off-ramping integration #164
Conversation
28d13d8
to
a75764c
Compare
681c464
to
48b5e64
Compare
"GB" | ||
]; | ||
|
||
let MIN_AMOUNT_DOLLARS = 15; |
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 note that this value (15) gets overwritten when componentDidMount
is called.
constructor(props) { | ||
super(props); | ||
|
||
const pk = localStorage.getItem("metaPrivateKey"); |
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.
Really unhappy with this. But it's currently the way burner-modules are supposed to be written :/
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 have a quick call about this?
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.
return ( | ||
<div> | ||
<Box mb={4}> | ||
{/* TODO: How to put this into i18n without creating a mess?*/} |
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.
Still unclear how this can be done with i18n
. I'd propose to just ignore it for now...
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.
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.
i18next is what was used in the initial implementation. That's what the internationalization is running on
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.
I'll take a look at this and see if there is a better solution to it
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.
Testing off-ramping functionality on mainnet with metamask:
- Try to exit ETH to Fiat ($25)
At the stage or pasting the IBAN there's a warning in the console:
index.js:1437 Warning: A component is changing an uncontrolled input of type text to be controlled. Input elements should not switch from uncontrolled to controlled (or vice versa). Decide between using a controlled or uncontrolled input element for the lifetime of the component. More info: https://fb.me/react-controlled-components
in input (created by Context.Consumer)
in StyledComponent (created by Input)
in Input (at Bity.js:378)...
Then after performing the exchange and metamask confirmation, got this:
Uncaught (in promise) Error: Returned error: Error: Error: [ethjs-rpc] rpc error with payload {"id":5958094193946,"jsonrpc":"2.0","params":["0xf869328477359400809442e17e25f885a0be481867bdc8aab458c442996988012baa5ac39f67d68026a0d9800e725290a7aeae77538a8501de877a8eb4c4c075b6502ba597e30cc6a5bba005a2c1138ebb93fdbc331ee5c73290f83ad5fd9d80a0353ec3a9d7ba12da214c"],"method":"eth_sendRawTransaction"} {"code":-32000,"message":"intrinsic gas too low"}
Burner's interface stalled with this picture:
and there's an error in metamask as well:
Money not lost :)
However expected the transaction to be performed...
Later observed this in the console (maybe related):
Error: Returned values aren't valid, did it run Out of Gas?
at ABICoder.push../node_modules/web3-eth-abi/src/index.js.ABICoder.decodeParameters (index.js:227)
mainnet, as i noted in the first sentence :) |
Okay, |
139b616
to
260f9e4
Compare
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.
Successfully checked on the mainnet with and without metamask: order has been created and processed, view updated with basic details - good work @TimDaub !
Fixes #107
Checkout

Receipt

Order Status

Todos:
Cashout.js
to e.g.Bity.js
<Loader>
time? Or Serviceworker that transfers in the background?Problems
I've created issues for problems that I deemed were not solveable in the scope of this PR:
<RecentTransaction />
time is based on side chain block number": <RecentTransaction /> time is based on side chain block number #172