Skip to content

Commit

Permalink
bugfix doTransferToken sending gas to wrong address
Browse files Browse the repository at this point in the history
undo only in test
  • Loading branch information
snowypowers committed Dec 10, 2017
1 parent d87ce72 commit bd32f07
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/api/nep5.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ export const doTransferToken = (net, scriptHash, fromWif, toAddress, transferAmo
.then((values) => {
endpt = values[0]
const balances = values[1]
const fromAddrScriptHash = reverseHex(getScriptHashFromAddress(account.address))
const fromAddrScriptHash = getScriptHashFromAddress(account.address)
const intents = [
{ assetId: ASSET_ID.GAS, value: 0.00000001, scriptHash: fromAddrScriptHash }
]
Expand All @@ -128,7 +128,7 @@ export const doTransferToken = (net, scriptHash, fromWif, toAddress, transferAmo
})
.then((res) => {
if (res.result === true) {
res.txid = signedTx
res.txid = signedTx.hash
}
return res
})
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/rpc/query.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { DEFAULT_RPC, ASSET_ID, CONTRACTS } from '../../../src/consts'
import testKeys from '../testKeys.json'
import mockData from './mockData.json'

describe.only('Query', function () {
describe('Query', function () {
let mock

before(() => {
Expand Down

0 comments on commit bd32f07

Please sign in to comment.