@dodoex/api 3.5.1-react.1 → 3.7.0

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 CHANGED
@@ -1,29 +1,29 @@
1
- # API
2
-
3
- DODO Service API
4
-
5
- ## HOW TO USE
6
-
7
- ```TypeScript
8
- import { SwapWidgetApi } from '@dodoex/api';
9
- import { SwapWidget } from '@dodoex/widgets';
10
-
11
- const dodoService = new SwapWidgetApi();
12
- const apikey = ""
13
- const projectId = "";
14
-
15
- export default function Swap() {
16
- React.useEffect(() => {
17
- if (projectId && apiKey) {
18
- const dodoService = new SwapWidgetApi();
19
- dodoService
20
- .getConfigSwapWidgetProps(projectId, apiKey)
21
- .then(({ swapWidgetProps }) => {
22
- setConfig(swapWidgetProps);
23
- });
24
- }
25
- }, [projectId, apiKey]);
26
-
27
- return <SwapWidget {...config} apikey={apiKey} />;
28
- }
29
- ```
1
+ # API
2
+
3
+ DODO Service API
4
+
5
+ ## HOW TO USE
6
+
7
+ ```TypeScript
8
+ import { SwapWidgetApi } from '@dodoex/api';
9
+ import { SwapWidget } from '@dodoex/widgets';
10
+
11
+ const dodoService = new SwapWidgetApi();
12
+ const apikey = ""
13
+ const projectId = "";
14
+
15
+ export default function Swap() {
16
+ React.useEffect(() => {
17
+ if (projectId && apiKey) {
18
+ const dodoService = new SwapWidgetApi();
19
+ dodoService
20
+ .getConfigSwapWidgetProps(projectId, apiKey)
21
+ .then(({ swapWidgetProps }) => {
22
+ setConfig(swapWidgetProps);
23
+ });
24
+ }
25
+ }, [projectId, apiKey]);
26
+
27
+ return <SwapWidget {...config} apikey={apiKey} />;
28
+ }
29
+ ```