Skip to content

Commit f1834b6

Browse files
authored
fix bignum/bigint conversion for kudos send (#6956)
1 parent 3a2dfbb commit f1834b6

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

app/assets/v2/js/pages/kudos_send.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ $(document).ready(function() {
272272

273273
// get kudosPrice from the HTML
274274
kudosPriceInEth = parseFloat($('#kudosPrice').attr('data-ethprice'));
275-
kudosPriceInWei = new web3.utils.BN((kudosPriceInEth * 1.0 * Math.pow(10, 18)));
275+
kudosPriceInWei = new web3.utils.BN((BigInt(kudosPriceInEth * 1.0 * Math.pow(10, 18))));
276276

277277
var formData = {
278278
email: email,
@@ -548,7 +548,7 @@ function sendKudos(email, github_url, from_name, username, amountInEth, comments
548548
console.log('destinationAccount:' + destinationAccount);
549549

550550
var kudosPriceInEth = parseFloat($('#kudosPrice').attr('data-ethprice')) || $('.kudos-search').select2('data')[0].price_finney;
551-
var kudosPriceInWei = new web3.utils.BN((kudosPriceInEth * 1.0 * Math.pow(10, 18)));
551+
var kudosPriceInWei = new web3.utils.BN((BigInt(kudosPriceInEth * 1.0 * Math.pow(10, 18))));
552552

553553
if (is_direct_to_recipient) {
554554
// Step 9

0 commit comments

Comments
 (0)