@ukeyfe/hardware-core 1.1.29 → 1.1.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/__tests__/evmSignTransaction.test.ts +4 -1
- package/dist/api/FirmwareUpdateV2.d.ts.map +1 -1
- package/dist/api/aptos/AptosSignInMessage.d.ts +4 -1
- package/dist/api/aptos/AptosSignInMessage.d.ts.map +1 -1
- package/dist/api/aptos/AptosSignTransaction.d.ts +4 -1
- package/dist/api/aptos/AptosSignTransaction.d.ts.map +1 -1
- package/dist/api/benfen/BenfenGetAddress.d.ts +4 -1
- package/dist/api/benfen/BenfenGetAddress.d.ts.map +1 -1
- package/dist/api/benfen/BenfenGetPublicKey.d.ts +4 -1
- package/dist/api/benfen/BenfenGetPublicKey.d.ts.map +1 -1
- package/dist/api/benfen/BenfenSignMessage.d.ts +4 -1
- package/dist/api/benfen/BenfenSignMessage.d.ts.map +1 -1
- package/dist/api/benfen/BenfenSignTransaction.d.ts +4 -1
- package/dist/api/benfen/BenfenSignTransaction.d.ts.map +1 -1
- package/dist/api/btc/BTCSignMessage.d.ts +4 -1
- package/dist/api/btc/BTCSignMessage.d.ts.map +1 -1
- package/dist/api/btc/BTCSignPsbt.d.ts +4 -1
- package/dist/api/btc/BTCSignPsbt.d.ts.map +1 -1
- package/dist/api/cardano/CardanoSignMessage.d.ts +4 -1
- package/dist/api/cardano/CardanoSignMessage.d.ts.map +1 -1
- package/dist/api/cardano/CardanoSignTransaction.d.ts.map +1 -1
- package/dist/api/evm/EVMSignTransaction.d.ts +6 -2
- package/dist/api/evm/EVMSignTransaction.d.ts.map +1 -1
- package/dist/api/firmware/FirmwareUpdateBaseMethod.d.ts.map +1 -1
- package/dist/api/kaspa/KaspaGetAddress.d.ts +4 -1
- package/dist/api/kaspa/KaspaGetAddress.d.ts.map +1 -1
- package/dist/api/kaspa/KaspaSignTransaction.d.ts +4 -1
- package/dist/api/kaspa/KaspaSignTransaction.d.ts.map +1 -1
- package/dist/api/neo/NeoGetAddress.d.ts +4 -1
- package/dist/api/neo/NeoGetAddress.d.ts.map +1 -1
- package/dist/api/neo/NeoSignTransaction.d.ts +4 -1
- package/dist/api/neo/NeoSignTransaction.d.ts.map +1 -1
- package/dist/api/solana/SolSignMessage.d.ts +4 -1
- package/dist/api/solana/SolSignMessage.d.ts.map +1 -1
- package/dist/api/solana/SolSignOffchainMessage.d.ts +4 -1
- package/dist/api/solana/SolSignOffchainMessage.d.ts.map +1 -1
- package/dist/api/ton/TonSignMessage.d.ts.map +1 -1
- package/dist/api/tron/TronSignMessage.d.ts +4 -1
- package/dist/api/tron/TronSignMessage.d.ts.map +1 -1
- package/dist/api/tron/TronSignTransaction.d.ts.map +1 -1
- package/dist/data-manager/DataManager.d.ts.map +1 -1
- package/dist/device/Device.d.ts.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +205 -85
- package/dist/types/device.d.ts +1 -1
- package/dist/types/device.d.ts.map +1 -1
- package/dist/utils/deviceInfoUtils.d.ts.map +1 -1
- package/dist/utils/deviceSettings.d.ts.map +1 -1
- package/dist/utils/homescreen.d.ts +1 -1
- package/dist/utils/homescreen.d.ts.map +1 -1
- package/package.json +4 -4
- package/src/api/FirmwareUpdateV2.ts +5 -4
- package/src/api/FirmwareUpdateV3.ts +2 -2
- package/src/api/allnetwork/AllNetworkGetAddressBase.ts +1 -1
- package/src/api/aptos/AptosSignInMessage.ts +4 -1
- package/src/api/aptos/AptosSignTransaction.ts +4 -1
- package/src/api/benfen/BenfenGetAddress.ts +4 -1
- package/src/api/benfen/BenfenGetPublicKey.ts +4 -1
- package/src/api/benfen/BenfenSignMessage.ts +4 -1
- package/src/api/benfen/BenfenSignTransaction.ts +4 -1
- package/src/api/btc/BTCSignMessage.ts +4 -1
- package/src/api/btc/BTCSignPsbt.ts +4 -1
- package/src/api/cardano/CardanoSignMessage.ts +4 -1
- package/src/api/cardano/CardanoSignTransaction.ts +4 -1
- package/src/api/device/DeviceFullyUploadResource.ts +1 -1
- package/src/api/device/DeviceUploadResource.ts +1 -1
- package/src/api/evm/EVMSignTransaction.ts +4 -1
- package/src/api/evm/EVMSignTypedData.ts +2 -2
- package/src/api/evm/latest/signTypedHash.ts +2 -2
- package/src/api/evm/legacyV1/signTypedHash.ts +2 -2
- package/src/api/firmware/FirmwareUpdateBaseMethod.ts +4 -3
- package/src/api/kaspa/KaspaGetAddress.ts +4 -1
- package/src/api/kaspa/KaspaSignTransaction.ts +4 -1
- package/src/api/neo/NeoGetAddress.ts +4 -1
- package/src/api/neo/NeoSignTransaction.ts +4 -1
- package/src/api/solana/SolSignMessage.ts +4 -1
- package/src/api/solana/SolSignOffchainMessage.ts +4 -1
- package/src/api/ton/TonSignMessage.ts +12 -3
- package/src/api/tron/TronSignMessage.ts +4 -1
- package/src/api/tron/TronSignTransaction.ts +8 -2
- package/src/core/index.ts +1 -1
- package/src/data-manager/DataManager.ts +12 -7
- package/src/data-manager/MessagesConfig.ts +1 -1
- package/src/device/Device.ts +6 -2
- package/src/types/device.ts +6 -4
- package/src/types/settings.ts +1 -1
- package/src/utils/deviceFeaturesUtils.ts +12 -12
- package/src/utils/deviceInfoUtils.ts +15 -5
- package/src/utils/deviceSettings.ts +6 -3
- package/src/utils/deviceVersionUtils.ts +1 -1
- package/src/utils/homescreen.ts +33 -11
package/src/types/device.ts
CHANGED
|
@@ -96,12 +96,13 @@ export type IDeviceType =
|
|
|
96
96
|
| EDeviceType.ClassicPure
|
|
97
97
|
| EDeviceType.Mini
|
|
98
98
|
| EDeviceType.Touch
|
|
99
|
-
| EDeviceType.
|
|
99
|
+
| EDeviceType.Core26
|
|
100
|
+
| EDeviceType.Core27Pro;
|
|
100
101
|
|
|
101
102
|
/**
|
|
102
103
|
* model_classic: 'classic' | 'classic1s' | 'classicpure'
|
|
103
104
|
* model_mini: 'classic' | 'classic1s' | 'classicpure' | 'mini'
|
|
104
|
-
* model_touch: 'touch' | '
|
|
105
|
+
* model_touch: 'touch' | 'core26' | 'core27pro'
|
|
105
106
|
*/
|
|
106
107
|
export type IDeviceModel = 'model_classic' | 'model_mini' | 'model_touch' | 'model_classic1s';
|
|
107
108
|
|
|
@@ -112,7 +113,7 @@ export const DeviceModelToTypes: { [deviceModel in IDeviceModel]: IDeviceType[]
|
|
|
112
113
|
EDeviceType.ClassicPure,
|
|
113
114
|
EDeviceType.Mini,
|
|
114
115
|
],
|
|
115
|
-
model_touch: [EDeviceType.Touch, EDeviceType.
|
|
116
|
+
model_touch: [EDeviceType.Touch, EDeviceType.Core26, EDeviceType.Core27Pro],
|
|
116
117
|
model_classic: [EDeviceType.Classic, EDeviceType.Classic1s, EDeviceType.ClassicPure],
|
|
117
118
|
model_classic1s: [EDeviceType.Classic1s, EDeviceType.ClassicPure],
|
|
118
119
|
};
|
|
@@ -123,7 +124,8 @@ export const DeviceTypeToModels: { [deviceType in IDeviceType]: IDeviceModel[] }
|
|
|
123
124
|
[EDeviceType.ClassicPure]: ['model_classic', 'model_mini', 'model_classic1s'],
|
|
124
125
|
[EDeviceType.Mini]: ['model_mini'],
|
|
125
126
|
[EDeviceType.Touch]: ['model_touch'],
|
|
126
|
-
[EDeviceType.
|
|
127
|
+
[EDeviceType.Core26]: ['model_touch'],
|
|
128
|
+
[EDeviceType.Core27Pro]: ['model_touch'],
|
|
127
129
|
[EDeviceType.Unknown]: [],
|
|
128
130
|
};
|
|
129
131
|
|
package/src/types/settings.ts
CHANGED
|
@@ -109,7 +109,7 @@ export type DeviceTypeMap = {
|
|
|
109
109
|
[k in IKnownDevice]: {
|
|
110
110
|
/** Base firmware field (required for backward compatibility) */
|
|
111
111
|
firmware: IFirmwareReleaseInfo[];
|
|
112
|
-
/** Firmware v2 (Touch/
|
|
112
|
+
/** Firmware v2 (Touch/Core26/Core27Pro specific) */
|
|
113
113
|
'firmware-v2'?: IFirmwareReleaseInfo[];
|
|
114
114
|
/** Universal firmware v7 */
|
|
115
115
|
'firmware-v8'?: IFirmwareReleaseInfo[];
|
|
@@ -56,7 +56,7 @@ export const supportInputPinOnSoftware = (features: Features): SupportFeatureTyp
|
|
|
56
56
|
if (!features) return { support: false };
|
|
57
57
|
|
|
58
58
|
const deviceType = getDeviceType(features);
|
|
59
|
-
if (deviceType === EDeviceType.Touch || deviceType === EDeviceType.
|
|
59
|
+
if (deviceType === EDeviceType.Touch || deviceType === EDeviceType.Core26 || deviceType === EDeviceType.Core27Pro) {
|
|
60
60
|
return { support: false };
|
|
61
61
|
}
|
|
62
62
|
|
|
@@ -68,7 +68,7 @@ export const supportNewPassphrase = (features?: Features): SupportFeatureType =>
|
|
|
68
68
|
if (!features) return { support: false };
|
|
69
69
|
|
|
70
70
|
const deviceType = getDeviceType(features);
|
|
71
|
-
if (deviceType === EDeviceType.Touch || deviceType === EDeviceType.
|
|
71
|
+
if (deviceType === EDeviceType.Touch || deviceType === EDeviceType.Core26 || deviceType === EDeviceType.Core27Pro) {
|
|
72
72
|
return { support: true };
|
|
73
73
|
}
|
|
74
74
|
|
|
@@ -96,13 +96,13 @@ export const getPassphraseStateWithRefreshDeviceInfo = async (
|
|
|
96
96
|
);
|
|
97
97
|
|
|
98
98
|
const isModeT =
|
|
99
|
-
getDeviceType(features) === EDeviceType.Touch || getDeviceType(features) === EDeviceType.
|
|
99
|
+
getDeviceType(features) === EDeviceType.Touch || getDeviceType(features) === EDeviceType.Core26 || getDeviceType(features) === EDeviceType.Core27Pro;
|
|
100
100
|
|
|
101
101
|
// 如果可以获取到 passphraseState,但是设备 features 显示设备未开启 passphrase,需要刷新设备状态
|
|
102
102
|
// if passphraseState can be obtained, but the device features show that the device has not enabled passphrase, the device status needs to be refreshed
|
|
103
103
|
const needRefreshWithPassphrase = passphraseState && features?.passphrase_protection !== true;
|
|
104
|
-
// 如果 Touch/
|
|
105
|
-
// if Touch/
|
|
104
|
+
// 如果 Touch/Core26/Core27Pro 在之前是锁定状态,刷新设备状态
|
|
105
|
+
// if Touch/Core26/Core27Pro was locked before, refresh the device state
|
|
106
106
|
const needRefreshWithLocked = isModeT && locked;
|
|
107
107
|
|
|
108
108
|
if (needRefreshWithLocked || needRefreshWithPassphrase) {
|
|
@@ -148,7 +148,7 @@ export const getPassphraseState = async (
|
|
|
148
148
|
);
|
|
149
149
|
const supportGetPassphraseState =
|
|
150
150
|
supportAttachPinCapability ||
|
|
151
|
-
(deviceType === EDeviceType.
|
|
151
|
+
((deviceType === EDeviceType.Core26 || deviceType === EDeviceType.Core27Pro) && semver.gte(firmwareVersion.join('.'), '4.15.0'));
|
|
152
152
|
|
|
153
153
|
if (supportGetPassphraseState) {
|
|
154
154
|
const { message, type } = await commands.typedCall('GetPassphraseState', 'PassphraseState', {
|
|
@@ -197,7 +197,7 @@ export const supportBatchPublicKey = (
|
|
|
197
197
|
|
|
198
198
|
const deviceType = getDeviceType(features);
|
|
199
199
|
// btc batch get public key
|
|
200
|
-
if (!!options?.includeNode && deviceType === EDeviceType.
|
|
200
|
+
if (!!options?.includeNode && (deviceType === EDeviceType.Core26 || deviceType === EDeviceType.Core27Pro)) {
|
|
201
201
|
return semver.gte(currentVersion, '4.14.0');
|
|
202
202
|
}
|
|
203
203
|
if (!!options?.includeNode && deviceType === EDeviceType.Touch) {
|
|
@@ -214,7 +214,7 @@ export const supportBatchPublicKey = (
|
|
|
214
214
|
}
|
|
215
215
|
|
|
216
216
|
// support batch get public key
|
|
217
|
-
if (deviceType === EDeviceType.Touch || deviceType === EDeviceType.
|
|
217
|
+
if (deviceType === EDeviceType.Touch || deviceType === EDeviceType.Core26 || deviceType === EDeviceType.Core27Pro) {
|
|
218
218
|
return semver.gte(currentVersion, '3.1.0');
|
|
219
219
|
}
|
|
220
220
|
|
|
@@ -275,7 +275,7 @@ export const getFirmwareUpdateField = ({
|
|
|
275
275
|
|
|
276
276
|
return latestFirmwareField;
|
|
277
277
|
}
|
|
278
|
-
if (deviceType === EDeviceType.
|
|
278
|
+
if (deviceType === EDeviceType.Core26 || deviceType === EDeviceType.Core27Pro) {
|
|
279
279
|
return latestFirmwareField;
|
|
280
280
|
}
|
|
281
281
|
return 'firmware';
|
|
@@ -317,7 +317,7 @@ export const getFirmwareUpdateFieldArray = (
|
|
|
317
317
|
return ['firmware'];
|
|
318
318
|
}
|
|
319
319
|
|
|
320
|
-
if (deviceType === '
|
|
320
|
+
if (deviceType === 'core26' || deviceType === 'core27pro') {
|
|
321
321
|
return ['firmware-v8'];
|
|
322
322
|
}
|
|
323
323
|
|
|
@@ -336,8 +336,8 @@ export function fixVersion(version: string) {
|
|
|
336
336
|
}
|
|
337
337
|
|
|
338
338
|
export const fixFeaturesFirmwareVersion = (features: Features): Features => {
|
|
339
|
-
// 修复 Touch、
|
|
340
|
-
// fix Touch、
|
|
339
|
+
// 修复 Touch、Core26、Core27Pro 设备 bootloader 低于 2.5.2 版本时,返回的 features 中没有 firmware_version 错误的问题
|
|
340
|
+
// fix Touch、Core26、Core27Pro device when bootloader version is lower than 2.5.2, the features returned do not have firmware_version error
|
|
341
341
|
const tempFeatures = { ...features };
|
|
342
342
|
|
|
343
343
|
if (tempFeatures.ukey_firmware_version && !semver.valid(tempFeatures.ukey_firmware_version)) {
|
|
@@ -15,7 +15,7 @@ export const getDeviceType = (features?: Features): IDeviceType => {
|
|
|
15
15
|
return EDeviceType.Unknown;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
// classic1s 3.5.0
|
|
18
|
+
// classic1s 3.5.0, core26 4.6.0
|
|
19
19
|
switch (features.ukey_device_type) {
|
|
20
20
|
case 'CLASSIC':
|
|
21
21
|
return EDeviceType.Classic;
|
|
@@ -25,8 +25,10 @@ export const getDeviceType = (features?: Features): IDeviceType => {
|
|
|
25
25
|
return EDeviceType.Mini;
|
|
26
26
|
case 'TOUCH':
|
|
27
27
|
return EDeviceType.Touch;
|
|
28
|
-
case '
|
|
29
|
-
return EDeviceType.
|
|
28
|
+
case 'CORE26':
|
|
29
|
+
return EDeviceType.Core26;
|
|
30
|
+
case 'CORE27PRO':
|
|
31
|
+
return EDeviceType.Core27Pro;
|
|
30
32
|
case 'PURE':
|
|
31
33
|
return EDeviceType.ClassicPure;
|
|
32
34
|
default:
|
|
@@ -55,7 +57,8 @@ export const getDeviceType = (features?: Features): IDeviceType => {
|
|
|
55
57
|
if (miniFlag.toLowerCase() === 'cp') return EDeviceType.ClassicPure;
|
|
56
58
|
if (miniFlag.toLowerCase() === 'mi') return EDeviceType.Mini;
|
|
57
59
|
if (miniFlag.toLowerCase() === 'tc') return EDeviceType.Touch;
|
|
58
|
-
if (miniFlag.toLowerCase() === '
|
|
60
|
+
if (miniFlag.toLowerCase() === 'c6') return EDeviceType.Core26;
|
|
61
|
+
if (miniFlag.toLowerCase() === 'c7') return EDeviceType.Core27Pro;
|
|
59
62
|
|
|
60
63
|
// unknown device
|
|
61
64
|
return EDeviceType.Unknown;
|
|
@@ -74,7 +77,8 @@ export const getDeviceTypeByBleName = (name?: string): IDeviceType => {
|
|
|
74
77
|
if (name.startsWith('T')) return EDeviceType.Touch;
|
|
75
78
|
if (name.startsWith('Touch')) return EDeviceType.Touch;
|
|
76
79
|
|
|
77
|
-
if (name.startsWith('
|
|
80
|
+
if (name.startsWith('Core26')) return EDeviceType.Core26;
|
|
81
|
+
if (name.startsWith('Core27')) return EDeviceType.Core27Pro;
|
|
78
82
|
|
|
79
83
|
return EDeviceType.Unknown;
|
|
80
84
|
};
|
|
@@ -115,6 +119,12 @@ export const getDeviceLabel = (features?: Features) => {
|
|
|
115
119
|
if (deviceType === EDeviceType.ClassicPure) {
|
|
116
120
|
return 'UKey Classic 1S';
|
|
117
121
|
}
|
|
122
|
+
if (deviceType === EDeviceType.Core26) {
|
|
123
|
+
return 'UKey Core 26';
|
|
124
|
+
}
|
|
125
|
+
if (deviceType === EDeviceType.Core27Pro) {
|
|
126
|
+
return 'UKey Core 27 Pro';
|
|
127
|
+
}
|
|
118
128
|
|
|
119
129
|
return `UKey ${deviceType.charAt(0).toUpperCase() + deviceType.slice(1)}`;
|
|
120
130
|
};
|
|
@@ -33,7 +33,8 @@ export const getLanguageConfig = (deviceType: IDeviceType): Record<string, strin
|
|
|
33
33
|
break;
|
|
34
34
|
|
|
35
35
|
case EDeviceType.Touch:
|
|
36
|
-
case EDeviceType.
|
|
36
|
+
case EDeviceType.Core26:
|
|
37
|
+
case EDeviceType.Core27Pro:
|
|
37
38
|
keys = Object.keys(LANGUAGE_LABELS) as LanguageKey[];
|
|
38
39
|
break;
|
|
39
40
|
default:
|
|
@@ -65,7 +66,8 @@ export const getAutoLockOptions = (_deviceType: IDeviceType): DurationParts[] =>
|
|
|
65
66
|
{ seconds: 0, minute: 0, hour: 0, day: 0 },
|
|
66
67
|
];
|
|
67
68
|
case EDeviceType.Touch:
|
|
68
|
-
case EDeviceType.
|
|
69
|
+
case EDeviceType.Core26:
|
|
70
|
+
case EDeviceType.Core27Pro:
|
|
69
71
|
return [
|
|
70
72
|
{ seconds: 30, minute: 0, hour: 0, day: 0 },
|
|
71
73
|
{ seconds: 0, minute: 1, hour: 0, day: 0 },
|
|
@@ -95,7 +97,8 @@ export const getAutoShutDownOptions = (_deviceType: IDeviceType): DurationParts[
|
|
|
95
97
|
{ seconds: 0, minute: 0, hour: 0, day: 0 },
|
|
96
98
|
];
|
|
97
99
|
case EDeviceType.Touch:
|
|
98
|
-
case EDeviceType.
|
|
100
|
+
case EDeviceType.Core26:
|
|
101
|
+
case EDeviceType.Core27Pro:
|
|
99
102
|
return [
|
|
100
103
|
{ seconds: 0, minute: 1, hour: 0, day: 0 },
|
|
101
104
|
{ seconds: 0, minute: 2, hour: 0, day: 0 },
|
|
@@ -45,7 +45,7 @@ export const getDeviceBLEFirmwareVersion = (features: Features): IVersionArray =
|
|
|
45
45
|
export const getDeviceBootloaderVersion = (features: Features | undefined): IVersionArray => {
|
|
46
46
|
if (!features) return [0, 0, 0];
|
|
47
47
|
|
|
48
|
-
// classic1s 3.5.0
|
|
48
|
+
// classic1s 3.5.0, core26 4.6.0
|
|
49
49
|
if (semver.valid(features.ukey_boot_version)) {
|
|
50
50
|
return features.ukey_boot_version?.split('.') as unknown as IVersionArray;
|
|
51
51
|
}
|
package/src/utils/homescreen.ts
CHANGED
|
@@ -229,7 +229,7 @@ export const getTouchData = (): Record<string, IScreenData> => ({
|
|
|
229
229
|
'wallpaper-3': { name: 'wallpaper-3', hex: '77616c6c70617065722d332e706e67' },
|
|
230
230
|
'wallpaper-4': { name: 'wallpaper-4', hex: '77616c6c70617065722d342e706e67' },
|
|
231
231
|
});
|
|
232
|
-
export const
|
|
232
|
+
export const getCore26Data = (): Record<string, IScreenData> => ({
|
|
233
233
|
'wallpaper-1': { name: 'wallpaper-1', hex: '77616c6c70617065722d312e6a7067' },
|
|
234
234
|
'wallpaper-2': { name: 'wallpaper-2', hex: '77616c6c70617065722d322e6a7067' },
|
|
235
235
|
'wallpaper-3': { name: 'wallpaper-3', hex: '77616c6c70617065722d332e6a7067' },
|
|
@@ -251,8 +251,11 @@ export const getHomeScreenHex = (deviceType: IDeviceType, name: string) => {
|
|
|
251
251
|
case EDeviceType.Touch:
|
|
252
252
|
data = getTouchData();
|
|
253
253
|
break;
|
|
254
|
-
case EDeviceType.
|
|
255
|
-
data =
|
|
254
|
+
case EDeviceType.Core26:
|
|
255
|
+
data = getCore26Data();
|
|
256
|
+
break;
|
|
257
|
+
case EDeviceType.Core27Pro:
|
|
258
|
+
data = getCore26Data();
|
|
256
259
|
break;
|
|
257
260
|
default:
|
|
258
261
|
data = {};
|
|
@@ -276,14 +279,26 @@ export const getHomeScreenDefaultList = (features: Features) => {
|
|
|
276
279
|
case EDeviceType.Touch:
|
|
277
280
|
data = getTouchData();
|
|
278
281
|
break;
|
|
279
|
-
case EDeviceType.
|
|
282
|
+
case EDeviceType.Core26:
|
|
280
283
|
if (semver.gte(deviceVersion, '4.10.0')) {
|
|
281
|
-
data =
|
|
284
|
+
data = getCore26Data();
|
|
282
285
|
} else {
|
|
283
|
-
data = Object.keys(
|
|
286
|
+
data = Object.keys(getCore26Data())
|
|
284
287
|
.slice(0, 4)
|
|
285
288
|
.reduce((obj, key) => {
|
|
286
|
-
obj[key] =
|
|
289
|
+
obj[key] = getCore26Data()[key];
|
|
290
|
+
return obj;
|
|
291
|
+
}, {} as Record<string, IScreenData>);
|
|
292
|
+
}
|
|
293
|
+
break;
|
|
294
|
+
case EDeviceType.Core27Pro:
|
|
295
|
+
if (semver.gte(deviceVersion, '4.10.0')) {
|
|
296
|
+
data = getCore26Data();
|
|
297
|
+
} else {
|
|
298
|
+
data = Object.keys(getCore26Data())
|
|
299
|
+
.slice(0, 4)
|
|
300
|
+
.reduce((obj, key) => {
|
|
301
|
+
obj[key] = getCore26Data()[key];
|
|
287
302
|
return obj;
|
|
288
303
|
}, {} as Record<string, IScreenData>);
|
|
289
304
|
}
|
|
@@ -324,15 +339,22 @@ export const getHomeScreenSize = ({
|
|
|
324
339
|
> = {
|
|
325
340
|
touch: {
|
|
326
341
|
thumbnail: {
|
|
327
|
-
Nft: { width:
|
|
342
|
+
Nft: { width: 204, height: 204 },
|
|
328
343
|
WallPaper: { width: 144, height: 240 },
|
|
329
344
|
},
|
|
330
345
|
full: { width: 480, height: 800 },
|
|
331
346
|
},
|
|
332
|
-
|
|
347
|
+
core26: {
|
|
348
|
+
thumbnail: {
|
|
349
|
+
Nft: { width: 204, height: 204, radius: 20 },
|
|
350
|
+
WallPaper: { width: 144, height: 240, radius: 20 },
|
|
351
|
+
},
|
|
352
|
+
full: { width: 480, height: 800 },
|
|
353
|
+
},
|
|
354
|
+
core27pro: {
|
|
333
355
|
thumbnail: {
|
|
334
|
-
Nft: { width:
|
|
335
|
-
WallPaper: { width: 144, height: 240, radius:
|
|
356
|
+
Nft: { width: 204, height: 204, radius: 20 },
|
|
357
|
+
WallPaper: { width: 144, height: 240, radius: 20 },
|
|
336
358
|
},
|
|
337
359
|
full: { width: 480, height: 800 },
|
|
338
360
|
},
|