Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
Updates to Preview Branch (send-ui) ↗︎
Tasks are run on every commit but only new migration files are pushed.
View logs for this Workflow Run ↗︎. |
|
rebased it on latest master |
| }); | ||
| } | ||
|
|
||
| const sendAmount = convert(amount); |
There was a problem hiding this comment.
thinking about this now and I am not sure I understand it.
so if account is in USD and I paste the ln invoice the amount will be in btc and here we will convert it to usd according to our rate and then usd value will be stored. isn't that usd value then ignored because we need to pay exact btc amount for invoice to be actually paid and the actual dollar value will depend on the mint?
There was a problem hiding this comment.
Yea the idea here is that the user will then be redirected to /send/confirm and the send amount should be set to their input currency. So it might be ignored, but this sets it for the UI.
There was a problem hiding this comment.
why don't we just set it in bitcoin without the conversion?
There was a problem hiding this comment.
and disable the input so user can't change the amt
There was a problem hiding this comment.
We should definitely disable the input
why don't we just set it in bitcoin without the conversion?
I think that would work as long as we change these sendAccounts to sendAmount in the send-input:
} = useMoneyInput({
initialRawInputValue: sendAmount?.toString(sendCurrencyUnit) || '0',
initialInputCurrency: sendAccount.currency,
initialOtherCurrency: sendAccount.currency === 'BTC' ? 'USD' : 'BTC',
});
There was a problem hiding this comment.
added todo. we will try to improve it in a new pr
This adds the UI and flow for sending with cashu accounts.
Users can scan/paste invoices or cashu requests, or they can simply enter an amount to send a token.