Skip to content

Commit

Permalink
add toString to return correct value for verification.raw.topic B…
Browse files Browse the repository at this point in the history
…igNumber result returned by `web3` `1.0.0-beta.55`

- [CORE-256]
  • Loading branch information
Tobias Winkler committed Jul 12, 2019
1 parent 2c77b0f commit 063cb94
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
6 changes: 6 additions & 0 deletions VERSIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,15 @@
### Features

### Fixes
- add `toString` to return correct value for `verification.raw.topic` BigNumber result returned by `web3` `1.0.0-beta.55`

### Deprecations

## Version 2.8.4
### Fixes
- add `toString` to return correct value for `verification.raw.topic` BigNumber result returned by `web3` `1.0.0-beta.55`



## Version 2.8.3
### Fixes
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,5 +85,5 @@
"testunitcoverage": "env-cmd ./.env.local npm run build && nyc -r lcov -e .ts -x \"$TESTSPECS\" mocha --exit -r ts-node/register $TESTSPECS && nyc report --reporter=text-lcov | coveralls"
},
"types": "./dist/index.d.ts",
"version": "2.8.3"
"version": "2.8.4"
}
4 changes: 2 additions & 2 deletions src/verifications/verifications.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1220,7 +1220,7 @@ export class Verifications extends Logger {
signature: (<any>verification).signature,
status: verificationFlag,
subject,
topic: verification.topic,
topic: verification.topic.toString(),
uri: (<any>verification).uri,
valid: await this.validateVerification(subject, verificationId, isIdentity),
};
Expand Down Expand Up @@ -1556,7 +1556,7 @@ export class Verifications extends Logger {
);

const dataHash = this.options.nameResolver.soliditySha3(
subjectIdentity, verification.topic, verification.data).replace('0x', '');
subjectIdentity, verification.topic.toString(), verification.data).replace('0x', '');
const recoveredAddress = this.options.executor.web3.eth.accounts.recover(
dataHash, verification.signature);
const issuerContract = this.options.contractLoader.loadContract(
Expand Down

0 comments on commit 063cb94

Please sign in to comment.