Skip to content

Commit

Permalink
fix bignum/bigint conversion for kudos send (#6956)
Browse files Browse the repository at this point in the history
  • Loading branch information
danlipert authored Jun 23, 2020
1 parent 3a2dfbb commit f1834b6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/assets/v2/js/pages/kudos_send.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit f1834b6

Please sign in to comment.