Skip to content

Commit f0d4856

Browse files
committed
fix: trezor - canary
1 parent 94370a7 commit f0d4856

File tree

17 files changed

+63
-69
lines changed

17 files changed

+63
-69
lines changed

packages/exceptions/tsconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
],
66
"exclude": [
77
"./src/**/*.spec.ts",
8-
"./src/**/*.test.ts"
8+
"./src/**/*.test.ts",
9+
"./dist"
910
]
1011
}

packages/sdk-ts/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@
128128
"@injectivelabs/grpc-web": "^0.0.1",
129129
"@injectivelabs/grpc-web-node-http-transport": "^0.0.2",
130130
"@injectivelabs/grpc-web-react-native-transport": "^0.0.2",
131-
"@injectivelabs/indexer-proto-ts-v2": "1.17.1",
131+
"@injectivelabs/indexer-proto-ts-v2": "1.17.2",
132132
"@injectivelabs/mito-proto-ts-v2": "1.17.1",
133133
"@injectivelabs/networks": "workspace:*",
134134
"@injectivelabs/olp-proto-ts-v2": "1.17.1",

packages/sdk-ts/src/client/indexer/transformers/IndexerGrpcAuctionTransformer.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ export class IndexerGrpcAuctionTransformer {
6868
? {
6969
id: grpcAuction.contract.id.toString(),
7070
bidTarget: grpcAuction.contract.bidTarget,
71+
isBidPlaced: grpcAuction.contract.isBidPlaced,
7172
currentSlots: grpcAuction.contract.currentSlots.toString(),
7273
totalSlots: grpcAuction.contract.totalSlots.toString(),
7374
maxUserAllocation: grpcAuction.contract.maxUserAllocation,

packages/sdk-ts/src/client/indexer/transformers/IndexerGrpcMegaVaultTransformer.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -364,17 +364,17 @@ export class IndexerGrpcMegaVaultTransformer {
364364
history: GrpcMegaVaultHistoricalTVL,
365365
): MegaVaultHistoricalTVL {
366366
return {
367-
t: history.t,
368-
v: history.v,
367+
t: history.t.toString(),
368+
v: history.v.toString(),
369369
}
370370
}
371371

372372
static grpcHistoricalPnLToHistoricalPnL(
373373
history: GrpcMegaVaultHistoricalPnL,
374374
): MegaVaultHistoricalPnL {
375375
return {
376-
t: history.t,
377-
v: history.v,
376+
t: history.t.toString(),
377+
v: history.v.toString(),
378378
}
379379
}
380380

@@ -384,8 +384,8 @@ export class IndexerGrpcMegaVaultTransformer {
384384
return {
385385
status: log.status,
386386
txHash: log.txHash,
387-
blockTime: log.blockTime,
388-
blockHeight: log.blockHeight,
387+
blockTime: log.blockTime.toString(),
388+
blockHeight: log.blockHeight.toString(),
389389
}
390390
}
391391
}

packages/sdk-ts/src/client/indexer/types/mega-vault.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,6 @@ export type GrpcMegaVaultVolatilityStats =
199199
InjectiveMegavaultRpcPb.VolatilityStats
200200

201201
export type GrpcMegaVaultOperatorRedemptionBucket =
202-
InjectiveMegaVaultRpc.RedemptionBucket
202+
InjectiveMegavaultRpcPb.RedemptionBucket
203203
export type GrpcMegaVaultOperationStatusLogEntry =
204-
InjectiveMegaVaultRpc.OperationStatusLogEntry
204+
InjectiveMegavaultRpcPb.OperationStatusLogEntry

packages/ts-types/tsconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
],
66
"exclude": [
77
"./src/**/*.spec.ts",
8-
"./src/**/*.test.ts"
8+
"./src/**/*.test.ts",
9+
"./dist"
910
]
1011
}

packages/wallets/wallet-core/src/broadcaster/MsgBroadcaster.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,9 @@ export class MsgBroadcaster {
369369
/** Account Details * */
370370
const { baseAccount, latestHeight } =
371371
await this.fetchAccountAndBlockDetails(tx.injectiveAddress)
372-
const timeoutHeight = toBigNumber(latestHeight).plus(txTimeoutInBlocks)
372+
const timeoutHeight = toBigNumber(latestHeight.toString()).plus(
373+
txTimeoutInBlocks,
374+
)
373375
const txTimeoutTimeInSeconds =
374376
txTimeoutInBlocks * DEFAULT_BLOCK_TIME_IN_SECONDS
375377
const txTimeoutTimeInMilliSeconds = txTimeoutTimeInSeconds * 1000
@@ -647,7 +649,7 @@ export class MsgBroadcaster {
647649
endpoints.grpc,
648650
).fetchLatestBlock()
649651

650-
const latestHeight = latestBlock!.header!.height
652+
const latestHeight = latestBlock!.header!.height.toString()
651653

652654
timeoutHeight = toBigNumber(latestHeight)
653655
.plus(txTimeoutInBlocks)
@@ -1387,7 +1389,7 @@ export class MsgBroadcaster {
13871389
const { baseAccount } = accountDetails
13881390

13891391
const latestBlock = await tendermintClient.fetchLatestBlock()
1390-
const latestHeight = latestBlock!.header!.height
1392+
const latestHeight = latestBlock!.header!.height.toString()
13911393

13921394
return {
13931395
baseAccount,

packages/wallets/wallet-trezor/src/strategy/hw/transport/base.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1+
import { loadTrezorConnect } from '../../lib.js'
12
import AccountManager from '../AccountManager.js'
2-
import { loadTrezorConnect, type Manifest } from '../../lib.js'
3+
import type { Manifest } from '../../lib.js'
34

45
const TREZOR_CONNECT_MANIFEST = {
56
email: 'contact@injectivelabs.org',

packages/wallets/wallet-trezor/src/strategy/lib.ts

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
// in the underlying @trezor/connect type definitions (there's a typo: comma instead of space).
33
// Instead, we define the minimal types we need inline.
44

5+
export type TrezorConnectType = typeof import('@trezor/connect-web').default
6+
57
type Manifest = {
68
appName: string
79
appIcon?: string
@@ -53,9 +55,17 @@ export type TrezorConnectWithWebSettings = {
5355
[key: string]: any
5456
}
5557

56-
export async function loadTrezorConnect(): Promise<TrezorConnectWithWebSettings> {
58+
export async function loadTrezorConnect() {
59+
console.log('🪵Loading TrezorConnect...')
60+
5761
const module = await import('@trezor/connect-web')
5862

59-
return (module as any).default
60-
.default as unknown as TrezorConnectWithWebSettings
63+
console.log('🪵Module:', module)
64+
65+
return module.default
66+
67+
// return (
68+
// (module as any).default.default ||
69+
// ((module as any).default as unknown as TrezorConnectWithWebSettings)
70+
// )
6171
}

pnpm-lock.yaml

Lines changed: 17 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)