File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
packages/core/src/api/evm Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change 11import semver from 'semver' ;
22import { get } from 'lodash' ;
33import BigNumber from 'bignumber.js' ;
4- import { ERRORS , HardwareErrorCode , EDeviceType } from '@onekeyfe/hd-shared' ;
4+ import { ERRORS , HardwareErrorCode } from '@onekeyfe/hd-shared' ;
55import {
66 EthereumTypedDataSignature ,
77 EthereumTypedDataStructAck ,
@@ -337,9 +337,15 @@ export default class EVMSignTypedData extends BaseMethod<EVMSignTypedDataParams>
337337 let biggerLimit = 1024 ; // 1k
338338
339339 const currentVersion = getDeviceFirmwareVersion ( this . device . features ) . join ( '.' ) ;
340+ const currentDeviceType = getDeviceType ( this . device . features ) ;
340341 const supportBiggerDataVersion = '4.4.0' ;
341342
342- if ( semver . gte ( currentVersion , supportBiggerDataVersion ) ) {
343+ const supportBiggerData =
344+ DeviceModelToTypes . model_classic1s . includes ( currentDeviceType ) ||
345+ ( DeviceModelToTypes . model_touch . includes ( currentDeviceType ) &&
346+ semver . gte ( currentVersion , supportBiggerDataVersion ) ) ;
347+
348+ if ( supportBiggerData ) {
343349 biggerLimit = 1536 ; // 1.5k
344350 }
345351
You can’t perform that action at this time.
0 commit comments