@ref-finance/ref-sdk 1.1.5 → 1.1.6
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/README.md +6 -4
- package/dist/ref-sdk.cjs.development.js +425 -1304
- package/dist/ref-sdk.cjs.development.js.map +1 -1
- package/dist/ref-sdk.cjs.production.min.js.map +1 -1
- package/dist/ref-sdk.esm.js +425 -1305
- package/dist/ref-sdk.esm.js.map +1 -1
- package/dist/ref-sdk.umd.development.js +425 -1304
- package/dist/ref-sdk.umd.development.js.map +1 -1
- package/dist/ref-sdk.umd.production.min.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -120,10 +120,12 @@ Response
|
|
|
120
120
|
|
|
121
121
|
Get tokens metadata and set token id as index.
|
|
122
122
|
|
|
123
|
+
Will fetch token matadata if the token not included in the allTokens.
|
|
124
|
+
|
|
123
125
|
Parameters
|
|
124
126
|
|
|
125
127
|
```plain
|
|
126
|
-
tokenIds: string[]
|
|
128
|
+
(tokenIds: string[], allTokens: Record<string, TokenMetadata>)
|
|
127
129
|
```
|
|
128
130
|
|
|
129
131
|
Example
|
|
@@ -132,7 +134,7 @@ Example
|
|
|
132
134
|
const tokensMetadata = await ftGetTokensMetadata([
|
|
133
135
|
'ref.fakes.testnet',
|
|
134
136
|
'wrap.testnet',
|
|
135
|
-
]);
|
|
137
|
+
],{});
|
|
136
138
|
```
|
|
137
139
|
|
|
138
140
|
Response
|
|
@@ -696,7 +698,7 @@ A QuickStart of Ref Swap component.
|
|
|
696
698
|
```plain
|
|
697
699
|
export interface SwapWidgetProps {
|
|
698
700
|
theme?: Theme;
|
|
699
|
-
|
|
701
|
+
defaultTokenList?: string[];
|
|
700
702
|
onSwap: (transactionsRef: Transaction[]) => void;
|
|
701
703
|
onDisConnect: () => void;
|
|
702
704
|
width: string;
|
|
@@ -720,7 +722,7 @@ export interface SwapWidgetProps {
|
|
|
720
722
|
```
|
|
721
723
|
|
|
722
724
|
- theme: widget theme for customization.
|
|
723
|
-
-
|
|
725
|
+
- defaultTokenList: default tokens with ref whitelist into token list in the widget.
|
|
724
726
|
- onSwap: Swap button triggers this function.
|
|
725
727
|
- width: width of widget component.
|
|
726
728
|
- height: height of widget component.
|