@orderly.network/hooks 1.0.23 → 1.0.25-alpha.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/dist/index.d.mts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +6 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +6 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +5 -5
package/dist/index.d.mts
CHANGED
|
@@ -5,7 +5,7 @@ import * as swr_infinite from 'swr/infinite';
|
|
|
5
5
|
import { SWRInfiniteKeyLoader, SWRInfiniteConfiguration } from 'swr/infinite';
|
|
6
6
|
import * as swr__internal from 'swr/_internal';
|
|
7
7
|
import * as _orderly_network_core from '@orderly.network/core';
|
|
8
|
-
import { AccountState, Account, EventEmitter, ConfigKey, ConfigStore, OrderlyKeyStore, getWalletAdapterFunc } from '@orderly.network/core';
|
|
8
|
+
import { AccountState, Account, EventEmitter, ConfigKey, ConfigStore, OrderlyKeyStore, getWalletAdapterFunc, IContract } from '@orderly.network/core';
|
|
9
9
|
export { default as useConstant } from 'use-constant';
|
|
10
10
|
import { WS } from '@orderly.network/net';
|
|
11
11
|
import * as react from 'react';
|
|
@@ -113,6 +113,7 @@ type RequireAtLeastOne<T, R extends keyof T = keyof T> = Omit<T, R> & {
|
|
|
113
113
|
interface ConfigProviderProps {
|
|
114
114
|
configStore?: ConfigStore;
|
|
115
115
|
keyStore?: OrderlyKeyStore;
|
|
116
|
+
contracts?: IContract;
|
|
116
117
|
getWalletAdapter?: getWalletAdapterFunc;
|
|
117
118
|
brokerId: string;
|
|
118
119
|
networkId: NetworkId;
|
package/dist/index.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ import * as swr_infinite from 'swr/infinite';
|
|
|
5
5
|
import { SWRInfiniteKeyLoader, SWRInfiniteConfiguration } from 'swr/infinite';
|
|
6
6
|
import * as swr__internal from 'swr/_internal';
|
|
7
7
|
import * as _orderly_network_core from '@orderly.network/core';
|
|
8
|
-
import { AccountState, Account, EventEmitter, ConfigKey, ConfigStore, OrderlyKeyStore, getWalletAdapterFunc } from '@orderly.network/core';
|
|
8
|
+
import { AccountState, Account, EventEmitter, ConfigKey, ConfigStore, OrderlyKeyStore, getWalletAdapterFunc, IContract } from '@orderly.network/core';
|
|
9
9
|
export { default as useConstant } from 'use-constant';
|
|
10
10
|
import { WS } from '@orderly.network/net';
|
|
11
11
|
import * as react from 'react';
|
|
@@ -113,6 +113,7 @@ type RequireAtLeastOne<T, R extends keyof T = keyof T> = Omit<T, R> & {
|
|
|
113
113
|
interface ConfigProviderProps {
|
|
114
114
|
configStore?: ConfigStore;
|
|
115
115
|
keyStore?: OrderlyKeyStore;
|
|
116
|
+
contracts?: IContract;
|
|
116
117
|
getWalletAdapter?: getWalletAdapterFunc;
|
|
117
118
|
brokerId: string;
|
|
118
119
|
networkId: NetworkId;
|
package/dist/index.js
CHANGED
|
@@ -558,7 +558,8 @@ var OrderlyConfigProvider = (props) => {
|
|
|
558
558
|
getWalletAdapter,
|
|
559
559
|
brokerId,
|
|
560
560
|
networkId,
|
|
561
|
-
enableSwapDeposit
|
|
561
|
+
enableSwapDeposit,
|
|
562
|
+
contracts
|
|
562
563
|
} = props;
|
|
563
564
|
if (!brokerId && typeof configStore === "undefined") {
|
|
564
565
|
console.error("[OrderlyConfigProvider]: brokerId is required");
|
|
@@ -578,7 +579,10 @@ var OrderlyConfigProvider = (props) => {
|
|
|
578
579
|
account6 = new core.Account(
|
|
579
580
|
innerConfigStore,
|
|
580
581
|
innerKeyStore,
|
|
581
|
-
innerGetWalletAdapter
|
|
582
|
+
innerGetWalletAdapter,
|
|
583
|
+
{
|
|
584
|
+
contracts
|
|
585
|
+
}
|
|
582
586
|
);
|
|
583
587
|
core.SimpleDI.registerByName(core.Account.instanceName, account6);
|
|
584
588
|
}
|