Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
switch (action.kind) {
case (ActionKind.CREATE_ASSET): {
orderActions.push({
kind: ActionsOrderActionKind.CREATE_ASSET,
senderId: action.senderId,
receiverId: action.receiverId,
assetId: action.id,
assetImprint: action.imprint,
ledgerId: action.assetLedgerId,
} as FrameworkActionsOrderAction);
paymentAmount += this.context.payment.assetCreateCost;
break;
}
case (ActionKind.TRANSFER_ASSET): {
orderActions.push({
kind: ActionsOrderActionKind.TRANSFER_ASSET,
receiverId: action.receiverId,
assetId: action.id,
ledgerId: action.assetLedgerId,
senderId: action.senderId,
} as FrameworkActionsOrderAction);
paymentAmount += this.context.payment.assetTransferCost;
break;
}
case (ActionKind.TRANSFER_VALUE): {
orderActions.push({
kind: ActionsOrderActionKind.TRANSFER_VALUE,
senderId: action.senderId,
receiverId: action.receiverId,
value: new BigNumber(action.value).multipliedBy(multiplier).toFixed(0),
ledgerId: action.valueLedgerId,
} as FrameworkActionsOrderAction);