@dydxprotocol/v4-client-js 1.21.3 → 1.22.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/package.json
CHANGED
package/src/clients/native.ts
CHANGED
|
@@ -265,6 +265,22 @@ export async function getPerpetualMarkets(): Promise<string> {
|
|
|
265
265
|
}
|
|
266
266
|
}
|
|
267
267
|
|
|
268
|
+
export async function isWalletConnected(): Promise<string> {
|
|
269
|
+
try {
|
|
270
|
+
const client = globalThis.client;
|
|
271
|
+
if (client === undefined) {
|
|
272
|
+
throw new UserError('client is not connected. Call connectClient() first');
|
|
273
|
+
}
|
|
274
|
+
const wallet = globalThis.wallet;
|
|
275
|
+
if (wallet === undefined) {
|
|
276
|
+
throw new UserError('wallet is not set. Call connectWallet() first');
|
|
277
|
+
}
|
|
278
|
+
return await encodeJson( { "result": true } );
|
|
279
|
+
} catch (e) {
|
|
280
|
+
return wrappedError(e);
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
|
|
268
284
|
export async function placeOrder(payload: string): Promise<string> {
|
|
269
285
|
try {
|
|
270
286
|
const client = globalThis.client;
|