From 9ffd16beeda85977c2e8c5e7bf41357713e17e1c Mon Sep 17 00:00:00 2001 From: Dan Lipert Date: Tue, 23 Jun 2020 20:24:17 +0900 Subject: [PATCH] fix bignum/bigint conversion for kudos send --- app/assets/v2/js/pages/kudos_send.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/assets/v2/js/pages/kudos_send.js b/app/assets/v2/js/pages/kudos_send.js index 884d689c7e2..05d9bbe4647 100644 --- a/app/assets/v2/js/pages/kudos_send.js +++ b/app/assets/v2/js/pages/kudos_send.js @@ -272,7 +272,7 @@ $(document).ready(function() { // get kudosPrice from the HTML kudosPriceInEth = parseFloat($('#kudosPrice').attr('data-ethprice')); - kudosPriceInWei = new web3.utils.BN((kudosPriceInEth * 1.0 * Math.pow(10, 18))); + kudosPriceInWei = new web3.utils.BN((BigInt(kudosPriceInEth * 1.0 * Math.pow(10, 18)))); var formData = { email: email, @@ -548,7 +548,7 @@ function sendKudos(email, github_url, from_name, username, amountInEth, comments console.log('destinationAccount:' + destinationAccount); var kudosPriceInEth = parseFloat($('#kudosPrice').attr('data-ethprice')) || $('.kudos-search').select2('data')[0].price_finney; - var kudosPriceInWei = new web3.utils.BN((kudosPriceInEth * 1.0 * Math.pow(10, 18))); + var kudosPriceInWei = new web3.utils.BN((BigInt(kudosPriceInEth * 1.0 * Math.pow(10, 18)))); if (is_direct_to_recipient) { // Step 9