Skip to content
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

Don't ask for tx-hash before payment method selected #48

Closed
ligi opened this issue Jul 15, 2019 · 0 comments
Closed

Don't ask for tx-hash before payment method selected #48

ligi opened this issue Jul 15, 2019 · 0 comments

Comments

@ligi
Copy link
Member

ligi commented Jul 15, 2019

image

this is wrong - we cannot ask for the transaction hash before the payment method is selected or the order is placed.
This bad flow was introduced with the security fixes for #8 - the problem is when fixing the problem there where obstacles to get an input field in the.

I do not think the user should enter the TX-Hash at all

I propose the following:
the user just selects the currency type:
image

then we show a QR (ERC-681) and a Web3Connect link (or js call) to trigger the payment

important is that the data-field gets a mandatory payment object ID - so we can prevent #8 and the sniping attack @pipermerriam pointed out

but this means in the beginning we can only take ETH and xDAI no DAI yet.
Later on (but IMHO not in wave 1 for DevCon) we should create a smart contract that accepts ETH and DAI with a function

EDIT: we can also take DAI by using the least significant bits of the value to encode the payment object ID (less than 5000WEI for DevCon - so in comparison to gas usage negligible)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant