|
|
@@ -34,7 +34,7 @@ import {
|
|
|
|
import { DEFAULT_TRANSACTION_MEMO } from '@/constants/analytics';
|
|
|
|
import { DEFAULT_TRANSACTION_MEMO } from '@/constants/analytics';
|
|
|
|
import { DialogTypes } from '@/constants/dialogs';
|
|
|
|
import { DialogTypes } from '@/constants/dialogs';
|
|
|
|
import { UNCOMMITTED_ORDER_TIMEOUT_MS } from '@/constants/trade';
|
|
|
|
import { UNCOMMITTED_ORDER_TIMEOUT_MS } from '@/constants/trade';
|
|
|
|
import { DydxNetwork, isTestnet } from '@/constants/networks';
|
|
|
|
import { DydxChainId, isTestnet } from '@/constants/networks';
|
|
|
|
|
|
|
|
|
|
|
|
import { RootStore } from '@/state/_store';
|
|
|
|
import { RootStore } from '@/state/_store';
|
|
|
|
import { addUncommittedOrderClientId, removeUncommittedOrderClientId } from '@/state/account';
|
|
|
|
import { addUncommittedOrderClientId, removeUncommittedOrderClientId } from '@/state/account';
|
|
|
@@ -44,7 +44,10 @@ import { StatefulOrderError } from '../errors';
|
|
|
|
import { bytesToBigInt } from '../numbers';
|
|
|
|
import { bytesToBigInt } from '../numbers';
|
|
|
|
import { log } from '../telemetry';
|
|
|
|
import { log } from '../telemetry';
|
|
|
|
import { hashFromTx, getMintscanTxLink } from '../txUtils';
|
|
|
|
import { hashFromTx, getMintscanTxLink } from '../txUtils';
|
|
|
|
import { getDydxChainIdFromNetwork } from '../network';
|
|
|
|
|
|
|
|
|
|
|
|
(BigInt.prototype as any).toJSON = function () {
|
|
|
|
|
|
|
|
return this.toString();
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
class DydxChainTransactions implements AbacusDYDXChainTransactionsProtocol {
|
|
|
|
class DydxChainTransactions implements AbacusDYDXChainTransactionsProtocol {
|
|
|
|
private compositeClient: CompositeClient | undefined;
|
|
|
|
private compositeClient: CompositeClient | undefined;
|
|
|
@@ -239,10 +242,7 @@ class DydxChainTransactions implements AbacusDYDXChainTransactionsProtocol {
|
|
|
|
|
|
|
|
|
|
|
|
if (isTestnet) {
|
|
|
|
if (isTestnet) {
|
|
|
|
console.log(
|
|
|
|
console.log(
|
|
|
|
getMintscanTxLink(
|
|
|
|
getMintscanTxLink(this.compositeClient.network.getString() as DydxChainId, hash)
|
|
|
|
getDydxChainIdFromNetwork(this.compositeClient.network.getString() as DydxNetwork),
|
|
|
|
|
|
|
|
hash
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
);
|
|
|
|
);
|
|
|
|
} else console.log(`txHash: ${hash}`);
|
|
|
|
} else console.log(`txHash: ${hash}`);
|
|
|
|
|
|
|
|
|
|
|
@@ -538,7 +538,6 @@ class DydxChainTransactions implements AbacusDYDXChainTransactionsProtocol {
|
|
|
|
const result = await this.cctpWithdraw(params);
|
|
|
|
const result = await this.cctpWithdraw(params);
|
|
|
|
callback(result);
|
|
|
|
callback(result);
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
default: {
|
|
|
|
default: {
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|