Skip to content

Commit

Permalink
feat(transfer restrictions): make exempted list optional
Browse files Browse the repository at this point in the history
An undefined value defaults to an empty extemption list
  • Loading branch information
monitz87 committed Jan 14, 2021
1 parent 215d83e commit d84c403
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/api/procedures/addTransferRestriction.ts
Expand Up @@ -14,7 +14,7 @@ import {
import { batchArguments } from '~/utils/internal';

interface BaseParams {
exempted: string[];
exempted?: string[];
}

export type AddCountTransferRestrictionParams = BaseParams & {
Expand Down Expand Up @@ -51,7 +51,7 @@ export async function prepareAddTransferRestriction(
},
context,
} = this;
const { ticker, exempted } = args;
const { ticker, exempted = [] } = args;

const rawTicker = stringToTicker(ticker, context);

Expand Down Expand Up @@ -116,7 +116,7 @@ export async function prepareAddTransferRestriction(
*/
export function getAuthorization(
this: Procedure<AddTransferRestrictionParams, number>,
{ ticker, exempted }: AddTransferRestrictionParams
{ ticker, exempted = [] }: AddTransferRestrictionParams
): ProcedureAuthorization {
const transactions = [TxTags.statistics.AddTransferManager];

Expand Down

0 comments on commit d84c403

Please sign in to comment.