Skip to content

Commit

Permalink
fix: fix canSettle getting details from parent
Browse files Browse the repository at this point in the history
  • Loading branch information
VictorVicente committed Oct 20, 2020
1 parent a0d2275 commit 60ee94a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/api/entities/SecurityToken/Settlements.ts
Expand Up @@ -30,21 +30,22 @@ export class Settlements extends Namespace<SecurityToken> {
amount: BigNumber;
}): Promise<TransferStatus> {
const {
parent: { ticker, details },
parent: { ticker },
context: {
polymeshApi: { rpc },
},
context,
parent,
} = this;

const { to, amount } = args;
let { from } = args;
let isDivisible;

if (!from) {
[{ isDivisible }, from] = await Promise.all([details(), context.getCurrentIdentity()]);
[{ isDivisible }, from] = await Promise.all([parent.details(), context.getCurrentIdentity()]);
} else {
({ isDivisible } = await details());
({ isDivisible } = await parent.details());
}

/*
Expand Down

0 comments on commit 60ee94a

Please sign in to comment.