Skip to content

Commit

Permalink
feat: render Swap Claim opaque action (#633)
Browse files Browse the repository at this point in the history
  • Loading branch information
llllvvuu authored Feb 29, 2024
1 parent e34d38d commit 3457853
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions packages/types/src/transaction/perspective.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ import {
SpendView_Opaque,
} from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/component/shielded_pool/v1/shielded_pool_pb';
import {
SwapClaimView,
SwapClaimView_Opaque,
SwapView,
SwapView_Opaque,
} from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/component/dex/v1/dex_pb';
Expand Down Expand Up @@ -61,6 +63,20 @@ export const viewActionFromEmptyPerspective = (action: Action): ActionView | und
}),
},
});
case 'swapClaim':
return new ActionView({
actionView: {
case: 'swapClaim',
value: new SwapClaimView({
swapClaimView: {
case: 'opaque',
value: new SwapClaimView_Opaque({
swapClaim: action.action.value,
}),
},
}),
},
});
default:
// TODO: fill in other actions. most actions don't have views (they are their own view) so they can be passed through.
return undefined;
Expand Down

0 comments on commit 3457853

Please sign in to comment.