Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fix fee component on transfers #1548

Merged
merged 4 commits into from
Jan 15, 2025
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion apps/namadillo/src/App/Transfer/TransferDestination.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ export const TransferDestination = ({
openChainSelector,
openProviderSelector,
}: TransferDestinationProps): JSX.Element => {
const isExternalDestination = !!openChainSelector;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure this is the correct way of verifying that we can define the fee token. I think we should verify if the transfer is coming from Namada instead

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, agreed. I added the prop changeFeeEnabled to have a better control over it 👍


return (
<div
className={clsx("relative bg-neutral-800 rounded-lg px-4 pt-8 pb-4", {
Expand Down Expand Up @@ -126,7 +128,9 @@ export const TransferDestination = ({
{isIbcTransfer ?
<div className="flex justify-between items-center">
<img src={ibcTransferImageWhite} className="w-20" />
<TransactionFee gasConfig={gasConfig} />
{isExternalDestination ?
<TransactionFeeButton gasConfig={gasConfig} />
: <TransactionFee gasConfig={gasConfig} />}
</div>
: <div className="flex justify-end">
<TransactionFeeButton gasConfig={gasConfig} />
Expand Down
1 change: 1 addition & 0 deletions apps/namadillo/src/atoms/fees/atoms.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ export const defaultGasConfigFamily = atomFamily(
minimumGasPrice.data,
gasLimitsTable.data,
gasToken,
txKinds,
],
...queryDependentFn(async () => {
invariant(
Expand Down
Loading