Skip to content

Commit

Permalink
fix: trx sun balance
Browse files Browse the repository at this point in the history
  • Loading branch information
kilmas committed Sep 24, 2020
1 parent 894bc8f commit f9e2177
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/pages/Wallet/SendCoin.js
Original file line number Diff line number Diff line change
Expand Up @@ -189,10 +189,10 @@ class SendCoin extends React.Component {
transferTRX = _.throttle(async () => {
const { instance: tronWeb } = Tronweb
const { receiver, memo, amount } = this.state
let transaction = await tronWeb.transactionBuilder.sendTrx(receiver, amount * 10 ** 7)
let transaction = await tronWeb.transactionBuilder.sendTrx(receiver, amount * 10 ** 6)
transaction = await tronWeb.transactionBuilder.addUpdateData(transaction, memo)
const id = transaction.txID;
// const transaction = await tronWeb.trx.sendTransaction(receiver, amount * 10 ** 7)
// const transaction = await tronWeb.trx.sendTransaction(receiver, amount * 10 ** 6)
const signedTransaction = await tronWeb.trx.sign(transaction);
const receipt = await tronWeb.trx.sendRawTransaction(signedTransaction)

Expand Down
2 changes: 1 addition & 1 deletion src/stores/wallet/TRXWallet.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export default class TRXWallet extends Wallet {
return
}
if (this.coins[0]) {
this.coins[0].balance = Number(balance)
this.coins[0].balance = Number(balance / (10 ** 6))
}
}
}
Expand Down

0 comments on commit f9e2177

Please sign in to comment.