Skip to content

Commit 2a8448a

Browse files
jonatormattuphamyury-dubinin
authored
Variants conversion flow (osmosis-labs#3931)
* feat(asset-variants-conversion-modal): updates to styles * refactor(getAllocation): refactor to handle returning Asset for matching asset / canonical asset * feat(conversion-table): clean up table row * feat(conversion-checkboxes): make all checkboxes checked by default * feat(isAlloyed-tooltip): add logic / tooltip for alloyed assets * style(loader): add loader * style(i18n): translate values * test(allocation-tests): update allocation tests * style(alloyed-assets-conversion): clean up * feat(open-asset-conversion-modal): open modal from the toast or from the convert button clicks * feat(mobile-asset-variants): handle mobile (close toast and modal) * style(convert-asset-variants): clean up * fix(width-of-asset-container): set min max width * feat(routeTokensOutGivenIn): extract functionality and add extra method for a batch * fix(variant-conversions): clean up * fix(tokenInAmount): truncate dec * feat(asset-conversion): rows demo for individual asset conversion * feat(swaps): map to network fee * docs(row-swaps): moving back to multi-swap in other branch * silence remote patterns warning * invalidate portfolio query on tx * mobile, prevent animation, format date on chart hover * improve mobile table * less padding around table * adjust * cursor * TS file * hydration error * fix feature flags & duplicate popups * move to modal folder * fix table header * layout & display fees * display fee * rename, fix imports, clean up * fix font size & variant tx loading * improve table row UI, link to swap page * Fixes FE-1075 * unify * fix server tests * extract convert logic, add amplitude events * fix localizations * cleanup log * make it possible to specify variant in modal * fix opened event * close modal after conversion * improve fee text * coderabbitai review * add learn more link * keep modal open when converting * simulate swap, add error message, log unavailable event * upper bound fee $ calculation * typo * fixed locator * @JoseRFelix review * comment --------- Co-authored-by: Matt Upham <[email protected]> Co-authored-by: yurydubinin <[email protected]>
1 parent b828230 commit 2a8448a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+1435
-728
lines changed

README.md

+2
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,8 @@ yarn build:libs && npx lerna publish
121121

122122
To add translations, you can manually edit the JSON translation files in `packages/web/translations`, use the [inlang](https://inlang.com/) online editor, or run `yarn machine-translate` to add missing translations using AI from Inlang.
123123

124+
Note: we have tests in web package that ensure all localization files contain the same keys and that they're (best effort) all found within the TSX source files. These help keep our localizations up to date. To clean up localizations, check out the scripts in the web/localizations folder. They must be run using `node` within the localization folder.
125+
124126
## Asset Listings
125127

126128
Please see the asset [listing requirements](https://github.com/osmosis-labs/assetlists/blob/main/LISTING.md) to display assets on Osmosis Zone web app.

packages/server/src/queries/__tests__/mock-asset-lists.ts

+30
Original file line numberDiff line numberDiff line change
@@ -23494,6 +23494,36 @@ export const AssetLists: AssetList[] = [
2349423494
listingDate: "2024-05-03T13:00:00.000Z",
2349523495
relative_image_url: "/tokens/generated/seda.svg",
2349623496
},
23497+
{
23498+
chainName: "osmosis",
23499+
sourceDenom:
23500+
"factory/osmo1k6c8jln7ejuqwtqmay3yvzrg3kueaczl96pk067ldg8u835w0yhsw27twm/alloyed/allETH",
23501+
coinMinimalDenom:
23502+
"factory/osmo1k6c8jln7ejuqwtqmay3yvzrg3kueaczl96pk067ldg8u835w0yhsw27twm/alloyed/allETH",
23503+
symbol: "allETH",
23504+
decimals: 18,
23505+
logoURIs: {
23506+
png: "https://raw.githubusercontent.com/cosmos/chain-registry/master/osmosis/images/allETH.png",
23507+
svg: "https://raw.githubusercontent.com/cosmos/chain-registry/master/osmosis/images/allETH.svg",
23508+
},
23509+
coingeckoId: "allETH",
23510+
price: {
23511+
poolId: "1800",
23512+
denom:
23513+
"factory/osmo1k6c8jln7ejuqwtqmay3yvzrg3kueaczl96pk067ldg8u835w0yhsw27twm/alloyed/allETH",
23514+
},
23515+
categories: ["alloyed"],
23516+
transferMethods: [],
23517+
counterparty: [],
23518+
name: "allETH",
23519+
isAlloyed: true,
23520+
verified: true,
23521+
unstable: false,
23522+
disabled: false,
23523+
preview: false,
23524+
listingDate: "2024-06-01T10:00:00.000Z",
23525+
relative_image_url: "/tokens/generated/allETH.svg",
23526+
},
2349723527
],
2349823528
},
2349923529
];

0 commit comments

Comments
 (0)