Compare commits
2 Commits
main
...
fix-swallo
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ed7db77a34 | ||
|
|
854f12fcf1 |
@ -34,7 +34,7 @@ import {
|
||||
import { DEFAULT_TRANSACTION_MEMO } from '@/constants/analytics';
|
||||
import { DialogTypes } from '@/constants/dialogs';
|
||||
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 { addUncommittedOrderClientId, removeUncommittedOrderClientId } from '@/state/account';
|
||||
@ -44,7 +44,10 @@ import { StatefulOrderError } from '../errors';
|
||||
import { bytesToBigInt } from '../numbers';
|
||||
import { log } from '../telemetry';
|
||||
import { hashFromTx, getMintscanTxLink } from '../txUtils';
|
||||
import { getDydxChainIdFromNetwork } from '../network';
|
||||
|
||||
(BigInt.prototype as any).toJSON = function () {
|
||||
return this.toString();
|
||||
};
|
||||
|
||||
class DydxChainTransactions implements AbacusDYDXChainTransactionsProtocol {
|
||||
private compositeClient: CompositeClient | undefined;
|
||||
@ -239,10 +242,7 @@ class DydxChainTransactions implements AbacusDYDXChainTransactionsProtocol {
|
||||
|
||||
if (isTestnet) {
|
||||
console.log(
|
||||
getMintscanTxLink(
|
||||
getDydxChainIdFromNetwork(this.compositeClient.network.getString() as DydxNetwork),
|
||||
hash
|
||||
)
|
||||
getMintscanTxLink(this.compositeClient.network.getString() as DydxChainId, hash)
|
||||
);
|
||||
} else console.log(`txHash: ${hash}`);
|
||||
|
||||
@ -538,7 +538,6 @@ class DydxChainTransactions implements AbacusDYDXChainTransactionsProtocol {
|
||||
const result = await this.cctpWithdraw(params);
|
||||
callback(result);
|
||||
break;
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
break;
|
||||
|
||||
@ -1,8 +1,4 @@
|
||||
import { type DydxNetwork, ENVIRONMENT_CONFIG_MAP, type DydxChainId } from '@/constants/networks';
|
||||
|
||||
export const validateAgainstAvailableEnvironments = (value: DydxNetwork) =>
|
||||
Object.keys(ENVIRONMENT_CONFIG_MAP).includes(value);
|
||||
|
||||
export const getDydxChainIdFromNetwork = (network: DydxNetwork) => {
|
||||
return ENVIRONMENT_CONFIG_MAP[network].dydxChainId as DydxChainId;
|
||||
};
|
||||
Object.keys(ENVIRONMENT_CONFIG_MAP).includes(value);
|
||||
Loading…
Reference in New Issue
Block a user