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

Date.toLocaleString() is undefined #149

Open
gudnuf opened this issue Nov 12, 2024 · 0 comments
Open

Date.toLocaleString() is undefined #149

gudnuf opened this issue Nov 12, 2024 · 0 comments

Comments

@gudnuf
Copy link
Contributor

gudnuf commented Nov 12, 2024

Seems that the add transaction call in one of

  • createSendableToken - hooks/cashu/useCashu
  • sendToMintlessUser - hooks/boardwalk/useMintlessMode
  • payInvoice - hooks/cashu/useMintlessMode

are throwing an error on new Date().toLocaleString().

Should make sure this is always defined and move the new Date() logic to the HistorySlice

dispatch(
          addTransaction({
             type: 'ecash',
             transaction: {
                token: token,
                amount: -amount,
                unit: wallet.keys.unit === 'usd' ? 'usd' : 'sat',
                mint: wallet.mint.mintUrl,
                status: TxStatus.PENDING,
                date: new Date().toLocaleString(),
                pubkey: opts?.pubkey,
                gift: opts?.gift,
                fee: opts?.feeCents,
             },
          }),
       );

Screenshot 2024-11-12 at 13 56 07

Originally posted by @jbojcic1 in #137 (comment)

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