File tree 4 files changed +8
-8
lines changed
actions/aave-like/helpers
4 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -72,7 +72,7 @@ export function swapCall(
72
72
NetworkIds . BASEMAINNET ,
73
73
] . includes ( network )
74
74
? 'v5.0'
75
- : 'v4.0 '
75
+ : 'v4.1 '
76
76
return getOneInchCall ( swapAddress , network , oneInchVersion )
77
77
}
78
78
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ import type { Dictionary } from 'ts-essentials'
12
12
13
13
import { amountFromWei , amountToWei } from '@oasisdex/utils/lib/src/utils'
14
14
15
- const PROXY_API_ENDPOINT_SWAP = `/api/exchange/v4.0 /1/swap`
15
+ const PROXY_API_ENDPOINT_SWAP = `/api/exchange/v4.1 /1/swap`
16
16
17
17
interface Response {
18
18
fromToken : TokenDescriptor
Original file line number Diff line number Diff line change @@ -49,12 +49,12 @@ export const omniSwapProtocolsMap: NetworkIdsWithValues<string[]> = {
49
49
[ NetworkIds . GOERLI ] : [ ] ,
50
50
}
51
51
52
- export const omniSwapVersionMap : NetworkIdsWithValues < 'v4.0 ' | 'v5.0' > = {
53
- [ NetworkIds . MAINNET ] : 'v4.0 ' ,
52
+ export const omniSwapVersionMap : NetworkIdsWithValues < 'v4.1 ' | 'v5.0' > = {
53
+ [ NetworkIds . MAINNET ] : 'v4.1 ' ,
54
54
[ NetworkIds . BASEMAINNET ] : 'v5.0' ,
55
55
[ NetworkIds . OPTIMISMMAINNET ] : 'v5.0' ,
56
56
[ NetworkIds . ARBITRUMMAINNET ] : 'v5.0' ,
57
- [ NetworkIds . GOERLI ] : 'v4.0 ' , // doesn't matter
57
+ [ NetworkIds . GOERLI ] : 'v4.1 ' , // doesn't matter
58
58
}
59
59
60
60
export const omniNetworkMap : NetworkIdsWithValues < Network > = {
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ async function swapOneInchTokens(
17
17
recipient : string ,
18
18
slippage : string ,
19
19
chainId : number ,
20
- oneInchVersion : 'v4.0 ' | 'v5.0' ,
20
+ oneInchVersion : 'v4.1 ' | 'v5.0' ,
21
21
protocols : string [ ] = [ ] ,
22
22
) : Promise < any > {
23
23
const url = formatOneInchSwapUrl (
@@ -43,7 +43,7 @@ function formatOneInchSwapUrl(
43
43
slippage : string ,
44
44
recepient : string ,
45
45
chainId : number ,
46
- oneInchVersion : 'v4.0 ' | 'v5.0' ,
46
+ oneInchVersion : 'v4.1 ' | 'v5.0' ,
47
47
protocols : string [ ] = [ ] ,
48
48
) {
49
49
const protocolsParam = ! protocols ?. length ? '' : `&protocols=${ protocols . join ( ',' ) } `
@@ -84,7 +84,7 @@ export async function oneInchCallMock(
84
84
export function getOneInchCall (
85
85
swapAddress : string ,
86
86
networkId : NetworkIds = NetworkIds . MAINNET ,
87
- oneInchVersion : 'v4.0 ' | 'v5.0' = 'v4.0 ' ,
87
+ oneInchVersion : 'v4.1 ' | 'v5.0' = 'v4.1 ' ,
88
88
debug ?: true ,
89
89
) {
90
90
return async (
You can’t perform that action at this time.
0 commit comments