onchain, lightning, and utxo activity cards

This commit is contained in:
Paul Miller
2023-04-18 19:41:58 -05:00
parent 18e3ad8a41
commit 4be030749a
14 changed files with 330 additions and 30 deletions

View File

@@ -98,12 +98,7 @@ export function AmountEditable(props: { initialAmountSats: string, setAmountSats
// Fiat conversion
const [state, _] = useMegaStore()
async function getPrice() {
return await state.node_manager?.get_bitcoin_price()
}
const [price] = createResource(getPrice)
const amountInUsd = () => satsToUsd(price(), Number(displayAmount()) || 0, true)
const amountInUsd = () => satsToUsd(state.price, Number(displayAmount()) || 0, true)
// What we're all here for in the first place: returning a value
function handleSubmit() {