Skip to content

Commit fce07a4

Browse files
authored
Packaging: Update ts version, add typesversions (#550)
1 parent 2b7361b commit fce07a4

File tree

21 files changed

+1620
-1599
lines changed

21 files changed

+1620
-1599
lines changed

connect/package.json

+3
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,9 @@
6262
},
6363
"typesVersions": {
6464
"*": {
65+
"tokens":[
66+
"./dist/cjs/tokens.d.ts"
67+
],
6568
"*": [
6669
"./dist/cjs/index.d.ts"
6770
]

core/base/package.json

+6
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,12 @@
100100
},
101101
"typesVersions": {
102102
"*": {
103+
"tokens":[
104+
"./dist/cjs/constants/tokens/index.d.ts"
105+
],
106+
"contracts":[
107+
"./dist/cjs/constants/contracts/index.d.ts"
108+
],
103109
"*": [
104110
"./dist/cjs/index.d.ts"
105111
]

core/base/src/utils/layout/fixedDynamic.ts

+1
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ type FilterItemsOfLayout<L extends Layout, Fixed extends boolean> =
6868
? P extends readonly [infer H extends LayoutItem, ...infer T extends ProperLayout]
6969
? FilterItem<H, Fixed> extends infer NI
7070
? NI extends LayoutItem
71+
// @ts-ignore
7172
? [NI, ...FilterItemsOfLayout<T, Fixed>]
7273
: FilterItemsOfLayout<T, Fixed>
7374
: never

core/base/src/utils/mapping.ts

+1
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,7 @@ type TransformMapping<M extends MappingEntries, S extends Shape | void = void> =
263263

264264
type ObjectFromMappingEntries<M extends MappingEntries, D extends Depth[number]> = {
265265
[K in keyof M as (K extends `${number}` ? ToExtPropKey<M[K][0]> : never)]:
266+
//@ts-ignore
266267
M[K][1] extends infer V
267268
? D extends 1
268269
? V extends LeafValue<infer T>

package-lock.json

+28-21
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@
2020
"ts-node": "^10.9.1",
2121
"tsd": "^0.29.0",
2222
"turbo": "^1.11.2",
23-
"typedoc": "^0.24.8",
24-
"typescript": "^5.1.1"
23+
"typedoc": "^0.25.13",
24+
"typescript": "^5.4.5"
2525
},
2626
"scripts": {
2727
"lint": "npx turbo lint --no-cache --force",

platforms/evm/protocols/portico/src/bridge.ts

+12-7
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,10 @@ import { ethers } from 'ethers';
3232
import { porticoAbi, uniswapQuoterV2Abi } from './abis.js';
3333
import { PorticoApi } from './api.js';
3434
import { FEE_TIER } from './consts.js';
35-
import * as tokens from '@wormhole-foundation/sdk-connect/tokens';
35+
import {
36+
getTokensBySymbol,
37+
getTokenByAddress,
38+
} from '@wormhole-foundation/sdk-connect/tokens';
3639

3740
import { EvmWormholeCore } from '@wormhole-foundation/sdk-evm-core';
3841

@@ -242,14 +245,16 @@ export class EvmPorticoBridge<
242245
if (this.chain === 'Ethereum') return Wormhole.tokenId('Ethereum', address);
243246

244247
// get the nativeTokenDetails
245-
const nToken = tokens.getTokenByAddress(this.network, this.chain, address);
248+
const nToken = getTokenByAddress(this.network, this.chain, address);
246249
if (!nToken) throw new Error('Unsupported source token: ' + address);
247250

248-
const xToken = tokens
249-
.getTokensBySymbol(this.network, this.chain, nToken.symbol)
250-
?.find((orig) => {
251-
return orig.original === 'Ethereum';
252-
});
251+
const xToken = getTokensBySymbol(
252+
this.network,
253+
this.chain,
254+
nToken.symbol,
255+
)?.find((orig) => {
256+
return orig.original === 'Ethereum';
257+
});
253258
if (!xToken)
254259
throw new Error(
255260
`Unsupported symbol for chain ${nToken.symbol}: ${this.chain} `,

0 commit comments

Comments
 (0)