aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJacob Evans <jacob@dekz.net>2018-08-03 11:53:26 +0800
committerJacob Evans <jacob@dekz.net>2018-08-09 10:05:17 +0800
commit5d4dd406f2946b43377049d7422c72b433bc64ab (patch)
tree1bcd532d60cfce7d5a20ba1a7b9b61f5f52c12b7
parent9dd6ba78250d8bbde1d5023ce4ac4254884f4115 (diff)
downloaddexon-sol-tools-5d4dd406f2946b43377049d7422c72b433bc64ab.tar
dexon-sol-tools-5d4dd406f2946b43377049d7422c72b433bc64ab.tar.gz
dexon-sol-tools-5d4dd406f2946b43377049d7422c72b433bc64ab.tar.bz2
dexon-sol-tools-5d4dd406f2946b43377049d7422c72b433bc64ab.tar.lz
dexon-sol-tools-5d4dd406f2946b43377049d7422c72b433bc64ab.tar.xz
dexon-sol-tools-5d4dd406f2946b43377049d7422c72b433bc64ab.tar.zst
dexon-sol-tools-5d4dd406f2946b43377049d7422c72b433bc64ab.zip
Update Changelogs. Rebased from development
-rw-r--r--packages/0x.js/CHANGELOG.json12
-rw-r--r--packages/order-utils/CHANGELOG.json13
-rw-r--r--packages/order-utils/src/signature_utils.ts7
-rw-r--r--packages/types/CHANGELOG.json9
-rw-r--r--packages/types/src/index.ts5
5 files changed, 35 insertions, 11 deletions
diff --git a/packages/0x.js/CHANGELOG.json b/packages/0x.js/CHANGELOG.json
index 0a10e1ccf..88c1bd3a3 100644
--- a/packages/0x.js/CHANGELOG.json
+++ b/packages/0x.js/CHANGELOG.json
@@ -1,5 +1,14 @@
[
{
+ "version": "pending",
+ "changes": [
+ {
+ "pr": 914,
+ "note": "Update ecSignOrderHashAsync to return the signature as a string for immediate use in contracts"
+ }
+ ]
+ },
+ {
"version": "1.0.1-rc.3",
"changes": [
{
@@ -21,9 +30,6 @@
"changes": [
{
"note": "Dependencies updated"
- },
- {
- "note": "Update ecSignOrderHashAsync to return the signature as a string for immediate use in contracts"
}
],
"timestamp": 1532605697
diff --git a/packages/order-utils/CHANGELOG.json b/packages/order-utils/CHANGELOG.json
index 60f0855c2..c70448d69 100644
--- a/packages/order-utils/CHANGELOG.json
+++ b/packages/order-utils/CHANGELOG.json
@@ -1,5 +1,15 @@
[
{
+ "version": "pending",
+ "changes": [
+ {
+ "pr": 914,
+ "note":
+ "Update ecSignOrderHashAsync to return signature string with signature type byte. Removes messagePrefixOpts."
+ }
+ ]
+ },
+ {
"version": "1.0.1-rc.3",
"changes": [
{
@@ -30,9 +40,6 @@
"changes": [
{
"note": "Dependencies updated"
- },
- {
- "note": "Update ecSignOrderHashAsync to return signature string with signature type byte"
}
],
"timestamp": 1532605697
diff --git a/packages/order-utils/src/signature_utils.ts b/packages/order-utils/src/signature_utils.ts
index 07644ebe2..db5a35f80 100644
--- a/packages/order-utils/src/signature_utils.ts
+++ b/packages/order-utils/src/signature_utils.ts
@@ -271,11 +271,11 @@ export function convertECSignatureToSignatureHex(
/**
* Combines the signature proof and the Signature Type.
* @param signature The hex encoded signature proof
- * @param type The signature type, i.e EthSign, Trezor, Wallet etc.
+ * @param signatureType The signature type, i.e EthSign, Trezor, Wallet etc.
* @return Hex encoded string of signature proof with Signature Type
*/
-export function convertToSignatureWithType(signature: string, type: SignatureType): string {
- const signatureBuffer = Buffer.concat([ethUtil.toBuffer(signature), ethUtil.toBuffer(type)]);
+export function convertToSignatureWithType(signature: string, signatureType: SignatureType): string {
+ const signatureBuffer = Buffer.concat([ethUtil.toBuffer(signature), ethUtil.toBuffer(signatureType)]);
const signatureHex = `0x${signatureBuffer.toString('hex')}`;
return signatureHex;
}
@@ -291,6 +291,7 @@ export function addSignedMessagePrefix(message: string, signerProviderType: Sign
assert.doesBelongToStringEnum('signerProviderType', signerProviderType, SignerProviderType);
switch (signerProviderType) {
case SignerProviderType.Metamask:
+ case SignerProviderType.Ledger:
case SignerProviderType.EthSign: {
const msgBuff = ethUtil.toBuffer(message);
const prefixedMsgBuff = ethUtil.hashPersonalMessage(msgBuff);
diff --git a/packages/types/CHANGELOG.json b/packages/types/CHANGELOG.json
index 8520c5146..057d3451c 100644
--- a/packages/types/CHANGELOG.json
+++ b/packages/types/CHANGELOG.json
@@ -1,5 +1,14 @@
[
{
+ "version": "pending",
+ "changes": [
+ {
+ "pr": 914,
+ "note": "Added SignerProviderType"
+ }
+ ]
+ },
+ {
"version": "1.0.1-rc.3",
"changes": [
{
diff --git a/packages/types/src/index.ts b/packages/types/src/index.ts
index ba384dbb8..58399de4c 100644
--- a/packages/types/src/index.ts
+++ b/packages/types/src/index.ts
@@ -143,11 +143,12 @@ export enum SignatureType {
}
/**
- * The Signer Provider Type. Some Signer implementations use different message prefixes or implement different
- * eth_sign behaviour. Note EthSign is compatible with the Ledger device.
+ * The Signer Provider Type. Some Signer provider implementations use different message prefixes or implement different
+ * eth_sign behaviour.
*/
export enum SignerProviderType {
EthSign = 'ETH_SIGN',
+ Ledger = 'LEDGER',
Metamask = 'METAMASK',
Trezor = 'TREZOR',
}