Skip to content

Commit 8568617

Browse files
committed
more clean up
1 parent cff6007 commit 8568617

File tree

4 files changed

+12
-56
lines changed

4 files changed

+12
-56
lines changed

packages/core-mobile/.nvimlog

Whitespace-only changes.

packages/core-mobile/android/app/src/main/AndroidManifest.xml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,6 @@
2020
<!-- common -->
2121
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
2222

23-
<uses-permission android:name="android.permission.BLUETOOTH_SCAN" />
24-
<uses-permission android:name="android.permission.BLUETOOTH_CONNECT" />
25-
<!-- Android < 12 -->
26-
<uses-permission android:name="android.permission.BLUETOOTH" android:maxSdkVersion="30" />
27-
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" android:maxSdkVersion="30" />
28-
<!-- common -->
29-
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
30-
3123
<queries>
3224
<package android:name="com.twitter.android" />
3325
</queries>

packages/core-mobile/app/services/ledger/LedgerService.ts

Lines changed: 12 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -13,44 +13,13 @@ import {
1313
import { networks } from 'bitcoinjs-lib'
1414
import Logger from 'utils/Logger'
1515
import bs58 from 'bs58'
16-
17-
export interface AddressInfo {
18-
id: string
19-
address: string
20-
derivationPath: string
21-
network: string
22-
}
23-
24-
export interface ExtendedPublicKey {
25-
path: string
26-
key: string
27-
chainCode: string
28-
}
29-
30-
export interface PublicKeyInfo {
31-
key: string
32-
derivationPath: string
33-
curve: 'secp256k1' | 'ed25519'
34-
}
35-
36-
export enum LedgerAppType {
37-
AVALANCHE = 'Avalanche',
38-
SOLANA = 'Solana',
39-
ETHEREUM = 'Ethereum',
40-
UNKNOWN = 'Unknown'
41-
}
42-
43-
export const LedgerReturnCode = {
44-
SUCCESS: 0x9000,
45-
USER_REJECTED: 0x6985,
46-
APP_NOT_OPEN: 0x6a80,
47-
DEVICE_LOCKED: 0x5515,
48-
INVALID_PARAMETER: 0x6b00,
49-
COMMAND_NOT_ALLOWED: 0x6986
50-
} as const
51-
52-
export type LedgerReturnCodeType =
53-
typeof LedgerReturnCode[keyof typeof LedgerReturnCode]
16+
import {
17+
LedgerAppType,
18+
ExtendedPublicKey,
19+
LedgerReturnCode,
20+
PublicKeyInfo,
21+
AddressInfo
22+
} from './types'
5423

5524
export interface AppInfo {
5625
applicationName: string
@@ -129,7 +98,7 @@ export class LedgerService {
12998
throw new Error('Transport not initialized')
13099
}
131100

132-
return await getLedgerAppInfo(this.transport as any)
101+
return await getLedgerAppInfo(this.transport as Transport)
133102
}
134103

135104
// Map app name to our enum
@@ -224,7 +193,7 @@ export class LedgerService {
224193
Logger.info('Avalanche app detected, creating app instance...')
225194

226195
// Create Avalanche app instance
227-
const avalancheApp = new AppAvalanche(this.transport as any)
196+
const avalancheApp = new AppAvalanche(this.transport as Transport)
228197
Logger.info('Avalanche app instance created')
229198

230199
try {
@@ -413,7 +382,7 @@ export class LedgerService {
413382
// Use the SDK function directly (like the extension does)
414383
const publicKey = await getSolanaPublicKeyFromLedger(
415384
startIndex,
416-
this.transport as any
385+
this.transport as Transport
417386
)
418387

419388
const publicKeys: PublicKeyInfo[] = [
@@ -480,7 +449,7 @@ export class LedgerService {
480449
await this.waitForApp(LedgerAppType.AVALANCHE)
481450

482451
// Create Avalanche app instance
483-
const avalancheApp = new AppAvalanche(this.transport as any)
452+
const avalancheApp = new AppAvalanche(this.transport as Transport)
484453

485454
const publicKeys: PublicKeyInfo[] = []
486455

@@ -554,7 +523,7 @@ export class LedgerService {
554523
await this.waitForApp(LedgerAppType.AVALANCHE)
555524

556525
// Create Avalanche app instance
557-
const avalancheApp = new AppAvalanche(this.transport as any)
526+
const avalancheApp = new AppAvalanche(this.transport as Transport)
558527

559528
const addresses: AddressInfo[] = []
560529

packages/core-mobile/ios/AvaxWallet/Info.plist

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,6 @@
5151
<string>$(CURRENT_PROJECT_VERSION)</string>
5252
<key>ITSAppUsesNonExemptEncryption</key>
5353
<false/>
54-
<key>LSApplicationQueriesSchemes</key>
55-
<array>
56-
<string>twitter</string>
57-
<string>mailto</string>
58-
</array>
5954
<key>LSMinimumSystemVersion</key>
6055
<string>13.3.0</string>
6156
<key>LSRequiresIPhoneOS</key>

0 commit comments

Comments
 (0)