@rango-dev/widget-embedded 0.12.1-next.18 → 0.12.1-next.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/TokenList/TokenList.d.ts.map +1 -1
- package/dist/components/TokenList/TokenList.types.d.ts +1 -0
- package/dist/components/TokenList/TokenList.types.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +3 -3
- package/dist/pages/SelectSwapItemsPage.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/BlockchainList/BlockchainList.tsx +1 -1
- package/src/components/TokenList/TokenList.tsx +2 -1
- package/src/components/TokenList/TokenList.types.ts +1 -0
- package/src/pages/SelectSwapItemsPage.tsx +4 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectSwapItemsPage.d.ts","sourceRoot":"","sources":["../../src/pages/SelectSwapItemsPage.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAS,MAAM,WAAW,CAAC;AAI9C,OAAO,KAA8B,MAAM,OAAO,CAAC;AAgBnD,UAAU,SAAS;IACjB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,oBAAoB,CAAC,EAAE,MAAM,EAAE,CAAC;IAChC,eAAe,CAAC,EAAE,KAAK,EAAE,CAAC;IAC1B,YAAY,CAAC,EAAE,KAAK,EAAE,CAAC;CACxB;AAED,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,SAAS,
|
|
1
|
+
{"version":3,"file":"SelectSwapItemsPage.d.ts","sourceRoot":"","sources":["../../src/pages/SelectSwapItemsPage.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAS,MAAM,WAAW,CAAC;AAI9C,OAAO,KAA8B,MAAM,OAAO,CAAC;AAgBnD,UAAU,SAAS;IACjB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,oBAAoB,CAAC,EAAE,MAAM,EAAE,CAAC;IAChC,eAAe,CAAC,EAAE,KAAK,EAAE,CAAC;IAC1B,YAAY,CAAC,EAAE,KAAK,EAAE,CAAC;CACxB;AAED,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,SAAS,qBAuInD"}
|
package/package.json
CHANGED
|
@@ -83,7 +83,7 @@ const renderDesc = (props: RenderDescProps) => {
|
|
|
83
83
|
};
|
|
84
84
|
|
|
85
85
|
export function TokenList(props: PropTypes) {
|
|
86
|
-
const { list, searchedFor = '', onChange } = props;
|
|
86
|
+
const { list, searchedFor = '', onChange, selectedBlockchain } = props;
|
|
87
87
|
|
|
88
88
|
const [tokens, setTokens] = useState<TokenWithBalance[]>(list);
|
|
89
89
|
const loadingStatus = useMetaStore.use.loadingStatus();
|
|
@@ -253,6 +253,7 @@ export function TokenList(props: PropTypes) {
|
|
|
253
253
|
loadNextPage={loadNextPage}
|
|
254
254
|
innerElementType={innerElementType}
|
|
255
255
|
size={60}
|
|
256
|
+
key={`${selectedBlockchain}-${searchedFor}`}
|
|
256
257
|
/>
|
|
257
258
|
);
|
|
258
259
|
};
|
|
@@ -28,6 +28,7 @@ interface PropTypes {
|
|
|
28
28
|
|
|
29
29
|
export function SelectSwapItemsPage(props: PropTypes) {
|
|
30
30
|
const { type, supportedBlockchains, supportedTokens, pinnedTokens } = props;
|
|
31
|
+
const [selectedBlockchain, setSelectedBlockchain] = useState('');
|
|
31
32
|
const navigate = useNavigate();
|
|
32
33
|
const { navigateBackFrom } = useNavigateBack();
|
|
33
34
|
const {
|
|
@@ -120,6 +121,7 @@ export function SelectSwapItemsPage(props: PropTypes) {
|
|
|
120
121
|
} else {
|
|
121
122
|
setToBlockchain(blockchain, true);
|
|
122
123
|
}
|
|
124
|
+
setSelectedBlockchain(blockchain.name);
|
|
123
125
|
}
|
|
124
126
|
}}
|
|
125
127
|
/>
|
|
@@ -137,6 +139,8 @@ export function SelectSwapItemsPage(props: PropTypes) {
|
|
|
137
139
|
<Divider size={16} />
|
|
138
140
|
<TokenList
|
|
139
141
|
list={filterTokens(tokenList, searchedFor)}
|
|
142
|
+
selectedBlockchain={selectedBlockchain}
|
|
143
|
+
searchedFor={searchedFor}
|
|
140
144
|
onChange={(token) => {
|
|
141
145
|
const blockchain = blockchains.find(
|
|
142
146
|
(chain) => token.blockchain === chain.name
|