Skip to content

Commit

Permalink
fix: wrapper fee payer type
Browse files Browse the repository at this point in the history
  • Loading branch information
mateuszjasiuk committed Jan 27, 2025
1 parent d9cc843 commit e550e89
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion apps/extension/src/Approvals/Commitment.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import { TransactionCard } from "./TransactionCard";

type CommitmentProps = {
commitment: CommitmentDetailProps;
wrapperFeePayer?: string;
wrapperFeePayer: string;
};

const IconMap: Record<TxType, React.ReactNode> = {
Expand Down
2 changes: 2 additions & 0 deletions packages/sdk/src/tx/tx.ts
Original file line number Diff line number Diff line change
Expand Up @@ -466,6 +466,8 @@ export class Tx {

return {
...wrapperTx,
// Wrapper fee payer is always defined at this point
wrapperFeePayer: wrapperTx.wrapperFeePayer!,
commitments: commitments.map(
({ txType, hash, txCodeId, data, memo, maspTxIn, maspTxOut }) => ({
txType: txType as TxType,
Expand Down
2 changes: 2 additions & 0 deletions packages/types/src/tx/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,4 +79,6 @@ export type CommitmentDetailProps = SupportedTxProps & {

export type TxDetails = WrapperTxProps & {
commitments: CommitmentDetailProps[];
// We override wrapperFeePayer to be a string because it should always be defined at this point
wrapperFeePayer: string;
};

0 comments on commit e550e89

Please sign in to comment.