UNPKG

@ledgerhq/coin-aptos

Version:
17 lines 689 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getResourceAddress = void 0; const isWriteSetChangeWriteResource_1 = require("./isWriteSetChangeWriteResource"); function getResourceAddress(tx, event, event_name, getAddressProcessor) { for (const change of tx.changes) { if ((0, isWriteSetChangeWriteResource_1.isWriteSetChangeWriteResource)(change)) { const address = getAddressProcessor(change, event, event_name); if (address !== null) { return address; } } } return null; } exports.getResourceAddress = getResourceAddress; //# sourceMappingURL=getResourceAddress.js.map