Skip to content

Commit acf3ce6

Browse files
author
Christian Maniewski
committed
Fix multihash prop on save function
1 parent e014c2b commit acf3ce6

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/ipfs-access-controller.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,14 @@ class IPFSAccessController extends AbstractAccessController {
3434
}
3535

3636
async save () {
37-
let hash
3837
try {
3938
const access = JSON.stringify(this._access, null, 2)
4039
const dag = await this._ipfs.object.put(new Buffer(access))
41-
hash = dag.toJSON().multihash.toString()
40+
const hash = dag.toJSON().hash
41+
return path.join('/ipfs', hash)
4242
} catch (e) {
4343
console.log("ACCESS ERROR:", e)
4444
}
45-
return path.join('/ipfs', hash)
4645
}
4746

4847
async setup ({ accessControllerAddress: address }) {

0 commit comments

Comments
 (0)