Skip to content

Commit

Permalink
Revert "add to constants"
Browse files Browse the repository at this point in the history
This reverts commit 59ef452.
  • Loading branch information
0xAlec committed Oct 1, 2024
1 parent 59ef452 commit 0d0b06e
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/api/buildPayTransaction.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import type { Mock } from 'vitest';
import {
CDP_CREATE_PRODUCT_CHARGE,
CDP_HYDRATE_CHARGE,
} from '../network/constants';
} from '../network/definitions/pay';
import { sendRequest } from '../network/request';
import {
PAY_INVALID_CHARGE_ERROR_MESSAGE,
Expand Down
2 changes: 1 addition & 1 deletion src/api/buildPayTransaction.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {
CDP_CREATE_PRODUCT_CHARGE,
CDP_HYDRATE_CHARGE,
} from '../network/constants';
} from '../network/definitions/pay';
import { type JSONRPCResult, sendRequest } from '../network/request';
import type {
BuildPayTransactionParams,
Expand Down
2 changes: 1 addition & 1 deletion src/api/buildSwapTransaction.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { type Mock, beforeEach, describe, expect, it, vi } from 'vitest';
import { CDP_GET_SWAP_TRADE } from '../network/constants';
import { CDP_GET_SWAP_TRADE } from '../network/definitions/swap';
import { sendRequest } from '../network/request';
import { DEGEN_TOKEN, ETH_TOKEN } from '../swap/mocks';
import type { BuildSwapTransaction } from '../swap/types';
Expand Down
2 changes: 1 addition & 1 deletion src/api/buildSwapTransaction.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { CDP_GET_SWAP_TRADE } from '../network/constants';
import { CDP_GET_SWAP_TRADE } from '../network/definitions/swap';
import { sendRequest } from '../network/request';
import type { SwapAPIResponse } from '../swap/types';
import { getSwapErrorCode } from '../swap/utils/getSwapErrorCode';
Expand Down
6 changes: 0 additions & 6 deletions src/network/constants.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
import { version } from '../version';

export const CDP_LIST_SWAP_ASSETS = 'cdp_listSwapAssets';
export const CDP_GET_SWAP_QUOTE = 'cdp_getSwapQuote';
export const CDP_GET_SWAP_TRADE = 'cdp_getSwapTrade';
export const CDP_HYDRATE_CHARGE = 'cdp_hydrateCharge';
export const CDP_CREATE_PRODUCT_CHARGE = 'cdp_createProductCharge';

export const POST_METHOD = 'POST';
export const JSON_HEADERS = {
'Content-Type': 'application/json',
Expand Down
2 changes: 2 additions & 0 deletions src/network/definitions/pay.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export const CDP_HYDRATE_CHARGE = 'cdp_hydrateCharge';
export const CDP_CREATE_PRODUCT_CHARGE = 'cdp_createProductCharge';
3 changes: 3 additions & 0 deletions src/network/definitions/swap.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export const CDP_LIST_SWAP_ASSETS = 'cdp_listSwapAssets';
export const CDP_GET_SWAP_QUOTE = 'cdp_getSwapQuote';
export const CDP_GET_SWAP_TRADE = 'cdp_getSwapTrade';

0 comments on commit 0d0b06e

Please sign in to comment.