Skip to content

Commit

Permalink
Add Ics20Withdrawal info to tx approval popup
Browse files Browse the repository at this point in the history
  • Loading branch information
grod220 committed Mar 20, 2024
1 parent d4637a8 commit b027fdf
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ export const TransactionApproval = () => {

return (
<div className='flex h-screen flex-col justify-between'>
<div className='grow overflow-auto p-[30px] pt-10'>
<p className='bg-text-linear bg-clip-text font-headline text-2xl font-bold text-transparent'>
<div className='grow overflow-auto p-[30px] pb-44 pt-10'>
<p className='bg-text-linear bg-clip-text pb-2 font-headline text-2xl font-bold text-transparent'>
Confirm transaction
</p>

Expand Down
4 changes: 2 additions & 2 deletions packages/perspective/plan/view-action-plan.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@ describe('viewActionPlan()', () => {
});

describe('`withdrawal` action', () => {
test('returns an action view with the `ics20Withdrawal` case and no value', () => {
test('returns an action view with the `ics20Withdrawal` case as-is', () => {
const actionPlan = new ActionPlan({
action: {
case: 'ics20Withdrawal',
Expand All @@ -442,7 +442,7 @@ describe('viewActionPlan()', () => {
new ActionView({
actionView: {
case: 'ics20Withdrawal',
value: {},
value: { amount: { hi: 1n, lo: 0n } },
},
}),
),
Expand Down
2 changes: 1 addition & 1 deletion packages/perspective/plan/view-action-plan.ts
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ export const viewActionPlan =
return new ActionView({
actionView: {
case: 'ics20Withdrawal',
value: {},
value: actionPlan.action.value,
},
});
case 'delegate':
Expand Down
1 change: 1 addition & 0 deletions packages/perspective/translators/action-view.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ export const asPublicActionView: Translator<ActionView> = actionView => {
case 'delegate':
case 'undelegate':
case 'undelegateClaim':
case 'ics20Withdrawal':
return actionView;

default:
Expand Down
8 changes: 6 additions & 2 deletions packages/ui/components/ui/tx/view/memo-view.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,12 @@ export const MemoViewComponent = ({ memo: { memoView } }: { memo: MemoView }) =>
<ViewBox
label='Memo Text'
visibleContent={
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
<div>{memoView.value.plaintext?.text || '&nbsp;'}</div>
<div>
{/* eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing */}
{memoView.value.plaintext?.text || (
<span className='italic text-gray-600'>== none ==</span>
)}
</div>
}
/>
<ViewBox
Expand Down

0 comments on commit b027fdf

Please sign in to comment.