Rather than hard-code these, we now read them from on-chain contracts. The construction allows for the introduction of variable-lot-size deposits (which @NicholasDotSol is currently working on). Additionally, the QR code is now a bitcoin: URL and includes the funding amount directly.
There's some pretty nasty code here, because the bn.js numbers we get back from Web3 can't do decimal arithmetic, so we have to move to bignumber.js to do that arithmetic, but some parts of the system expect regular JS Numbers and others do need bn.js. So there's a bunch of back-and-forthing going on. Not sure what the best long-term solution is here, but this'll do for now.
Rather than hard-code these, we now read them from on-chain contracts. The construction allows for the introduction of variable-lot-size deposits (which @NicholasDotSol is currently working on). Additionally, the QR code is now a
bitcoin:
URL and includes the funding amount directly.There's some pretty nasty code here, because the
bn.js
numbers we get back from Web3 can't do decimal arithmetic, so we have to move tobignumber.js
to do that arithmetic, but some parts of the system expect regular JSNumber
s and others do needbn.js
. So there's a bunch of back-and-forthing going on. Not sure what the best long-term solution is here, but this'll do for now.