Skip to content

fix(links): use toWei for large send-with-link amounts (Fixes #240)#322

Open
rovidev95 wants to merge 1 commit into
austintgriffith:rimfrom
rovidev95:split/fix-240-send-link
Open

fix(links): use toWei for large send-with-link amounts (Fixes #240)#322
rovidev95 wants to merge 1 commit into
austintgriffith:rimfrom
rovidev95:split/fix-240-send-link

Conversation

@rovidev95

Copy link
Copy Markdown

Fixes #240

Problem

amount * 10**18 produces scientific notation for large native sends (e.g. 20,000 xDAI), breaking BN conversion in send-with-link.

Fix

Use web3.utils.toWei(String(amount), 'ether') for link deposit value and tx value.

Test plan

  • Manual: 20000 native amount no longer throws number-to-bn invalid value
  • Small amounts unchanged

Stacks on rim (same target branch as #204/#315 series). @TimDaub

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

Successfully merging this pull request may close these issues.

1 participant