@ledgerhq/hw-app-eth
Advanced tools
Comparing version 4.39.0 to 4.41.0
@@ -103,3 +103,12 @@ "use strict"; | ||
return this.transport.send(0xe0, 0x0a, 0x00, 0x00, data); | ||
return this.transport.send(0xe0, 0x0a, 0x00, 0x00, data).then(function () { | ||
return true; | ||
}, function (e) { | ||
if (e && e.statusCode === 0x6d00) { | ||
// this case happen for older version of ETH app, since older app version had the ERC20 data hardcoded, it's fine to assume it worked. | ||
// we return a flag to know if the call was effective or not | ||
return false; | ||
} | ||
throw e; | ||
}); | ||
} | ||
@@ -106,0 +115,0 @@ |
{ | ||
"name": "@ledgerhq/hw-app-eth", | ||
"version": "4.39.0", | ||
"version": "4.41.0", | ||
"description": "Ledger Hardware Wallet Ethereum Application API", | ||
@@ -41,3 +41,3 @@ "keywords": [ | ||
}, | ||
"gitHead": "0dda3c24d3de47de2f622f0c757ad637b297e5f9" | ||
"gitHead": "f460f1d319e478c5e24f1063473b734f899ae95f" | ||
} |
@@ -109,3 +109,3 @@ <img src="https://user-images.githubusercontent.com/211411/34776833-6f1ef4da-f618-11e7-8b13-f0697901d6a8.png" height="100" /> | ||
Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<void>** | ||
Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)>** | ||
@@ -112,0 +112,0 @@ #### signTransaction |
@@ -121,4 +121,14 @@ /******************************************************************************** | ||
*/ | ||
provideERC20TokenInformation({ data }: { data: Buffer }): Promise<void> { | ||
return this.transport.send(0xe0, 0x0a, 0x00, 0x00, data); | ||
provideERC20TokenInformation({ data }: { data: Buffer }): Promise<boolean> { | ||
return this.transport.send(0xe0, 0x0a, 0x00, 0x00, data).then( | ||
() => true, | ||
e => { | ||
if (e && e.statusCode === 0x6d00) { | ||
// this case happen for older version of ETH app, since older app version had the ERC20 data hardcoded, it's fine to assume it worked. | ||
// we return a flag to know if the call was effective or not | ||
return false; | ||
} | ||
throw e; | ||
} | ||
); | ||
} | ||
@@ -125,0 +135,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
251421
811