@dydxprotocol/v4-client-js 1.12.1 → 1.12.3
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/CHANGELOG.md +2 -2
- package/__native__/__ios__/v4-native-client.js +6 -7
- package/build/src/clients/modules/post.d.ts +1 -1
- package/build/src/clients/modules/post.js +2 -3
- package/build/src/clients/native.js +3 -3
- package/build/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/clients/modules/post.ts +12 -4
- package/src/clients/native.ts +2 -2
package/package.json
CHANGED
|
@@ -899,9 +899,9 @@ export class Post {
|
|
|
899
899
|
subaccount: SubaccountInfo,
|
|
900
900
|
affiliate: string,
|
|
901
901
|
broadcastMode?: BroadcastMode,
|
|
902
|
+
gasAdjustment: number = 2,
|
|
902
903
|
): Promise<BroadcastTxAsyncResponse | BroadcastTxSyncResponse | IndexedTx> {
|
|
903
904
|
const msg = this.registerAffiliateMsg(subaccount.address, affiliate);
|
|
904
|
-
const gasAdjustment = 1.8;
|
|
905
905
|
return this.send(
|
|
906
906
|
subaccount.wallet,
|
|
907
907
|
() => Promise.resolve([msg]),
|
|
@@ -918,13 +918,21 @@ export class Post {
|
|
|
918
918
|
return this.composer.composeMsgRegisterAffiliate(...args);
|
|
919
919
|
}
|
|
920
920
|
|
|
921
|
-
launchMarketMsg(
|
|
921
|
+
launchMarketMsg(
|
|
922
|
+
...args: Parameters<Composer['composeMsgCreateMarketPermissionless']>
|
|
923
|
+
): EncodeObject {
|
|
922
924
|
return this.composer.composeMsgCreateMarketPermissionless(...args);
|
|
923
925
|
}
|
|
924
926
|
|
|
925
|
-
async createMarketPermissionless(
|
|
927
|
+
async createMarketPermissionless(
|
|
928
|
+
ticker: string,
|
|
929
|
+
subaccount: SubaccountInfo,
|
|
930
|
+
broadcastMode?: BroadcastMode,
|
|
931
|
+
gasAdjustment?: number,
|
|
932
|
+
memo?: string,
|
|
933
|
+
): Promise<BroadcastTxAsyncResponse | BroadcastTxSyncResponse | IndexedTx> {
|
|
926
934
|
const msg = this.launchMarketMsg(subaccount.address, ticker, subaccount.subaccountNumber);
|
|
927
|
-
|
|
935
|
+
|
|
928
936
|
return this.send(
|
|
929
937
|
subaccount.wallet,
|
|
930
938
|
() => Promise.resolve([msg]),
|
package/src/clients/native.ts
CHANGED
|
@@ -439,7 +439,7 @@ export async function withdraw(payload: string): Promise<string> {
|
|
|
439
439
|
}
|
|
440
440
|
|
|
441
441
|
const subaccount = new SubaccountInfo(wallet, subaccountNumber);
|
|
442
|
-
const tx = await client.withdrawFromSubaccount(subaccount, amount, json.recipient);
|
|
442
|
+
const tx = await client.withdrawFromSubaccount(subaccount, amount, json.recipient, json.memo);
|
|
443
443
|
return encodeJson(tx);
|
|
444
444
|
} catch (error) {
|
|
445
445
|
return wrappedError(error);
|
|
@@ -560,7 +560,7 @@ export async function transferNativeToken(payload: string): Promise<string> {
|
|
|
560
560
|
},
|
|
561
561
|
false,
|
|
562
562
|
client.validatorClient.post.defaultDydxGasPrice,
|
|
563
|
-
|
|
563
|
+
json.memo,
|
|
564
564
|
);
|
|
565
565
|
return encodeJson(tx);
|
|
566
566
|
} catch (error) {
|