重命名 ActTransfer 为 ActionTransfer,贯彻“全称命名”的规范,以尽可能消灭所有可能的歧义。

This commit is contained in:
luk.lu
2019-04-09 09:37:08 +08:00
parent cb00588588
commit 43a825c7aa

View File

@@ -2,7 +2,7 @@ import axios from 'axios'
import * as Ticrypto from 'tic.crypto' import * as Ticrypto from 'tic.crypto'
import * as ticAction from 'tic.action' import * as ticAction from 'tic.action'
const TicActTransfer = ticAction.ActTransfer const TicActionTransfer = ticAction.ActionTransfer
const TIC_TXFEE = 10 const TIC_TXFEE = 10
@@ -91,7 +91,7 @@ export class TIC {
if (!toAddress || !amount) { if (!toAddress || !amount) {
throw new Error('ERROR:RequiredParamsMissing') throw new Error('ERROR:RequiredParamsMissing')
} // amount cannot be zero } // amount cannot be zero
let action = new TicActTransfer({ let action = new TicActionTransfer({
amount: parseInt(amount), amount: parseInt(amount),
toAddress: toAddress, toAddress: toAddress,
fee: option.gasFee, fee: option.gasFee,
@@ -122,7 +122,7 @@ export class TIC {
if (!option.toAddress || !option.amount) { if (!option.toAddress || !option.amount) {
throw new Error('ERROR:RequiredParamsMissing') throw new Error('ERROR:RequiredParamsMissing')
} }
let action = new TicActTransfer({ let action = new TicActionTransfer({
amount: parseInt(option.amount), amount: parseInt(option.amount),
toAddress: option.toAddress, toAddress: option.toAddress,
fee: option.fee || this._defaultFee, fee: option.fee || this._defaultFee,