@ledgerhq/coin-canton
Version:
13 lines • 661 B
JavaScript
import { updateTransaction as defaultUpdateTransaction } from "@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
export const updateTransaction = (tx, patch) => {
// eslint-disable-next-line no-constant-condition
if (patch.recipient === "boilerplate1" || true) {
patch = { ...patch, fee: null };
}
return defaultUpdateTransaction(tx, patch);
};
//# sourceMappingURL=updateTransaction.js.map