Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const isPayerSigner = order.signersIds.find((s) => s.toLowerCase() === order.payerId.toLowerCase());
if (!isPayerSigner) {
throw new Error('Payer must be listed as order\'s signer.');
}
}
const multiplier = new BigNumber(1000000000000000000);
const orderActions: FrameworkActionsOrderAction[] = [];
const date = Date.now();
let paymentAmount = 0;
for (const action of order.actions) {
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,