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

Function getApprovalsToAnAddress

CLI/commands/transfer_manager.js:832–847  ·  view source on GitHub ↗
(address)

Source from the content-addressed store, hash-verified

830}
831
832async function getApprovalsToAnAddress(address) {
833 function ApprovalDetail(_from, _to, _allowance, _expiryTime, _description) {
834 this.from = _from;
835 this.to = _to;
836 this.allowance = _allowance;
837 this.expiryTime = _expiryTime;
838 this.description = _description;
839 }
840
841 let results = [];
842 let approvals = await currentTransferManager.methods.getActiveApprovalsToUser(address).call();
843 for (let i = 0; i < approvals[0].length; i++) {
844 results.push(new ApprovalDetail(approvals[0][i], approvals[1][i], approvals[2][i], approvals[3][i], approvals[4][i]));
845 }
846 return results;
847}
848
849async function getManualApproval(_from, _to) {
850 let result = null;

Callers 1

getApprovalsArrayFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected