From 5afa977b2e49f982c6d5152d005db66d5f791231 Mon Sep 17 00:00:00 2001 From: HenryNguyen5 Date: Wed, 23 May 2018 14:57:29 -0400 Subject: [PATCH] Fix typo --- common/libs/ipfs-tokens.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/common/libs/ipfs-tokens.ts b/common/libs/ipfs-tokens.ts index e38ffc48..521d9483 100644 --- a/common/libs/ipfs-tokens.ts +++ b/common/libs/ipfs-tokens.ts @@ -23,7 +23,7 @@ type uint8 = any; interface GetEntryResponse { digest: bytes32; - hashfunction: uint8; + hashFunction: uint8; size: uint8; } @@ -34,14 +34,14 @@ interface GetEntryResponse { * @returns {(string|null)} base58 encoded multihash string */ function getMultihashFromBytes32(multihash: GetEntryResponse) { - const { digest, hashfunction, size } = multihash; + const { digest, hashFunction, size } = multihash; if (size === 0) { return null; } // prepend hashFunction and digest size const multihashBytes = Buffer.alloc(2 + digest.length); - multihashBytes[0] = hashfunction; + multihashBytes[0] = hashFunction; multihashBytes[1] = size; multihashBytes.set(digest, 2); @@ -72,7 +72,7 @@ function fetchLatestIpfsHash(key: number) { type: 'bytes32' }, { - name: 'hashfunction', + name: 'hashFunction', type: 'uint8' }, { @@ -91,9 +91,9 @@ function fetchLatestIpfsHash(key: number) { to: IPFS_MULTISIG_CONTRACT_ADDRESS }) .then(contract.getEntry.decodeOutput) - .then(({ digest, hashfunction, size }) => ({ + .then(({ digest, hashFunction, size }) => ({ digest, - hashfunction: handleValues(hashfunction).toNumber(), + hashFunction: handleValues(hashFunction).toNumber(), size: handleValues(size).toNumber() })) .then(getMultihashFromBytes32);