mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 01:39:44 +01:00
Patch gridplus-sdk for perf fix (#14582)
short-term fix for https://github.com/GridPlus/gridplus-sdk/pull/367
This commit is contained in:
parent
73a7ce9e39
commit
a7469979b4
27
patches/gridplus-sdk+1.1.6.patch
Normal file
27
patches/gridplus-sdk+1.1.6.patch
Normal file
@ -0,0 +1,27 @@
|
||||
patch from https://github.com/GridPlus/gridplus-sdk/pull/367
|
||||
diff --git a/node_modules/gridplus-sdk/dist/util.js b/node_modules/gridplus-sdk/dist/util.js
|
||||
index 08cc920..1f58806 100644
|
||||
--- a/node_modules/gridplus-sdk/dist/util.js
|
||||
+++ b/node_modules/gridplus-sdk/dist/util.js
|
||||
@@ -22,7 +22,7 @@ var elliptic_1 = __importDefault(require("elliptic"));
|
||||
var constants_1 = require("./constants");
|
||||
var COINS = constants_1.BIP_CONSTANTS.COINS, PURPOSES = constants_1.BIP_CONSTANTS.PURPOSES;
|
||||
var EC = elliptic_1.default.ec;
|
||||
-var ec = new EC('p256');
|
||||
+var ec;
|
||||
//--------------------------------------------------
|
||||
// LATTICE UTILS
|
||||
//--------------------------------------------------
|
||||
@@ -219,10 +219,12 @@ var parseDER = function (sigBuf) {
|
||||
};
|
||||
exports.parseDER = parseDER;
|
||||
var getP256KeyPair = function (priv) {
|
||||
+ if (ec === undefined) ec = new EC('p256');
|
||||
return ec.keyFromPrivate(priv, 'hex');
|
||||
};
|
||||
exports.getP256KeyPair = getP256KeyPair;
|
||||
var getP256KeyPairFromPub = function (pub) {
|
||||
+ if (ec === undefined) ec = new EC('p256');
|
||||
return ec.keyFromPublic(pub, 'hex');
|
||||
};
|
||||
exports.getP256KeyPairFromPub = getP256KeyPairFromPub;
|
Loading…
Reference in New Issue
Block a user