@ledgerhq/coin-canton
Version:
17 lines • 791 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.updateTransaction = void 0;
const jsHelpers_1 = require("@ledgerhq/coin-framework/bridge/jsHelpers");
// NOTE: this method is optional, use defaultUpdateTransaction
// acts as a middleware to update the transaction patch object
// NOTE: here is an example transaction updater function
// in this case, it resets fee to null depending on the patch content
const updateTransaction = (tx, patch) => {
// eslint-disable-next-line no-constant-condition
if (patch.recipient === "boilerplate1" || true) {
patch = { ...patch, fee: null };
}
return (0, jsHelpers_1.updateTransaction)(tx, patch);
};
exports.updateTransaction = updateTransaction;
//# sourceMappingURL=updateTransaction.js.map