aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2018-06-02 05:09:47 +0800
committerFabio Berger <me@fabioberger.com>2018-06-02 05:09:47 +0800
commit7ab80f01b5f3c3a9bd9ccc7155f3d780f680ff7a (patch)
tree696c3c04f10229503daca809716737fb14fa0bac
parent9ce4a5c7b1b6c48fa39abf66c2e25c53d17d3ff0 (diff)
downloaddexon-0x-contracts-7ab80f01b5f3c3a9bd9ccc7155f3d780f680ff7a.tar.gz
dexon-0x-contracts-7ab80f01b5f3c3a9bd9ccc7155f3d780f680ff7a.tar.zst
dexon-0x-contracts-7ab80f01b5f3c3a9bd9ccc7155f3d780f680ff7a.zip
Add comment to exported method
-rw-r--r--packages/order-utils/src/signature_utils.ts7
1 files changed, 7 insertions, 0 deletions
diff --git a/packages/order-utils/src/signature_utils.ts b/packages/order-utils/src/signature_utils.ts
index 7fb459326..5b56ef577 100644
--- a/packages/order-utils/src/signature_utils.ts
+++ b/packages/order-utils/src/signature_utils.ts
@@ -230,6 +230,13 @@ export async function ecSignOrderHashAsync(
throw new Error(OrderError.InvalidSignature);
}
+/**
+ * Adds the relevant prefix to the message being signed.
+ * @param message Message to sign
+ * @param messagePrefixType The type of message prefix to add. Different signers expect
+ * specific message prefixes.
+ * @return Prefixed message
+ */
export function addSignedMessagePrefix(message: string, messagePrefixType: MessagePrefixType): string {
switch (messagePrefixType) {
case MessagePrefixType.None: