@@ -61,20 +61,21 @@ export class TransactionBuilder {
6161 *
6262 * @param {Object } params - Action parameters.
6363 * @param {String } params.flavorId - ID of flavor to be issued.
64- * @param {Number|BigNumber } params.amount - Amount of the flavor to be issued.
64+ * @param {Number|String| BigNumber } params.amount - Amount of the flavor to be issued.
6565 * @param {String } params.destinationAccountId - Account ID specifying the
6666 * account controlling the flavor.
6767 * @param {Object } params.tokenTags - Tags to add to the receiving tokens.
6868 * @param {Object } params.actionTags - Tags to add to the action.
6969 */
7070 public issue ( params : {
7171 flavorId : string
72- amount : number | BigNumber
72+ amount : number | string | BigNumber
7373 destinationAccountId : string
7474 tokenTags ?: object
7575 actionTags ?: object
7676 } ) {
7777 validate ( params , 'IssueActionSchema' )
78+ params . amount = new BigNumber ( params . amount )
7879 this . actions . push ( Object . assign ( { } , params , { type : 'issue' } ) )
7980 }
8081
@@ -85,20 +86,21 @@ export class TransactionBuilder {
8586 * @param {String } params.sourceAccountId - Account ID specifying the account
8687 * controlling the flavor.
8788 * @param {String } params.flavorId - ID of flavor to be retired.
88- * @param {Number|BigNumber } params.amount - Amount of the flavor to be retired.
89+ * @param {Number|String| BigNumber } params.amount - Amount of the flavor to be retired.
8990 * @param {String } params.filter - Token filter string, see {@link https://dashboard.seq.com/docs/filters}.
9091 * @param {Array<String|Number> } params.filterParams - Parameter values for filter string (if needed).
9192 * @param {Object } params.actionTags - Tags to add to the action.
9293 */
9394 public retire ( params : {
9495 sourceAccountId : string
9596 flavorId : string
96- amount : number | BigNumber
97+ amount : number | string | BigNumber
9798 filter ?: string
9899 filterParams ?: object
99100 actionTags ?: object
100101 } ) {
101102 validate ( params , 'RetireActionSchema' )
103+ params . amount = new BigNumber ( params . amount )
102104 this . actions . push ( Object . assign ( { } , params , { type : 'retire' } ) )
103105 }
104106
@@ -110,7 +112,7 @@ export class TransactionBuilder {
110112 * @param {String } params.sourceAccountId - Account ID specifying the account
111113 * controlling the flavor.
112114 * @param {String } params.flavorId - ID of flavor to be transferred.
113- * @param {Number|BigNumber } params.amount - Amount of the flavor to be transferred.
115+ * @param {Number|String| BigNumber } params.amount - Amount of the flavor to be transferred.
114116 * @param {String } params.destinationAccountId - Account ID specifying the
115117 * account controlling the flavor.
116118 * @param {String } params.filter - Token filter string, see {@link https://dashboard.seq.com/docs/filters}.
@@ -121,14 +123,15 @@ export class TransactionBuilder {
121123 public transfer ( params : {
122124 sourceAccountId : string
123125 flavorId : string
124- amount : number | BigNumber
126+ amount : number | string | BigNumber
125127 destinationAccountId : string
126128 filter ?: string
127129 filterParams ?: object
128130 tokenTags ?: object
129131 actionTags ?: object
130132 } ) {
131133 validate ( params , 'TransferActionSchema' )
134+ params . amount = new BigNumber ( params . amount )
132135 this . actions . push ( Object . assign ( { } , params , { type : 'transfer' } ) )
133136 }
134137}
0 commit comments