MCPcopy Create free account
hub / github.com/PolymathNetwork/polymath-core / getApprovals

Function getApprovals

CLI/commands/transfer_manager.js:815–830  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

813}
814
815async function getApprovals() {
816 function ApprovalDetail(_from, _to, _allowance, _expiryTime, _description) {
817 this.from = _from;
818 this.to = _to;
819 this.allowance = _allowance;
820 this.expiryTime = _expiryTime;
821 this.description = _description;
822 }
823
824 let results = [];
825 let approvalDetails = await currentTransferManager.methods.getAllApprovals().call();
826 for (let i = 0; i < approvalDetails[0].length; i++) {
827 results.push(new ApprovalDetail(approvalDetails[0][i], approvalDetails[1][i], approvalDetails[2][i], approvalDetails[3][i], approvalDetails[4][i]));
828 }
829 return results;
830}
831
832async function getApprovalsToAnAddress(address) {
833 function ApprovalDetail(_from, _to, _allowance, _expiryTime, _description) {

Callers 1

getApprovalsArrayFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected