重命名 ActTransfer 为 ActionTransfer,贯彻“全称命名”的规范,以尽可能消灭所有可能的歧义。
This commit is contained in:
parent
f647747b0b
commit
ac2a97346e
6
tic.js
6
tic.js
@ -1,7 +1,7 @@
|
||||
'use strict'
|
||||
const axios = require('axios')
|
||||
const Ticrypto = require('tic.crypto')
|
||||
const ticActTransfer = require('tic.action').ActTransfer
|
||||
const ticActionTransfer = require('tic.action').ActionTransfer
|
||||
|
||||
const TIC_TXFEE = 10;
|
||||
const TIC_NODE = require('./netConfig').TIC_NODE
|
||||
@ -78,7 +78,7 @@ class TIC {
|
||||
|
||||
async sendTransaction(toAddress, amount, option = {gasFee : TIC_TXFEE}){
|
||||
if(!toAddress||!amount){throw new Error("ERROR:RequiredParamsMissing")} //amount cannot be zero
|
||||
let action = new ticActTransfer({
|
||||
let action = new ticActionTransfer({
|
||||
amount: parseInt(amount),
|
||||
toAddress: toAddress,
|
||||
fee: option.gasFee
|
||||
@ -108,7 +108,7 @@ class TIC {
|
||||
}
|
||||
getSerializedTx(option){
|
||||
if(!option.toAddress||!option.amount){throw new Error("ERROR:RequiredParamsMissing")}
|
||||
let action=new ticActTransfer({
|
||||
let action=new ticActionTransfer({
|
||||
amount: parseInt(option.amount),
|
||||
toAddress: option.toAddress,
|
||||
fee:option.fee||this._defaultFee
|
||||
|
Loading…
Reference in New Issue
Block a user