Skip to content

Commit

Permalink
fix(url): passed the urls parameter down in the announce function
Browse files Browse the repository at this point in the history
passed the urls parameter down in the announce function to the iscreated function
  • Loading branch information
khawarizmus committed Nov 1, 2018
1 parent ebccd02 commit 19c68e3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
3 changes: 0 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,7 @@ branches:
- master
notifications:
email: false
# before_script:
# - npm prune
script:
# - npm install --no-optional
- npm run validate
- npm run build
after_success:
Expand Down
10 changes: 5 additions & 5 deletions src/ApostilleAccount.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,14 +65,14 @@ export class ApostilleAccount {
initiatorAccount: Initiator,
rawData: string,
mosaics: Mosaic[] | Mosaic[] = [],
url?: string,
urls?: string,
hashFunction?: HashFunction,
): Promise<void> {
if (initiatorAccount.account.address.networkType !== this.publicAccount.address.networkType) {
throw new Error(Errors[Errors.NETWORK_TYPE_MISMATCHED]);
}
// check if the apostille was already created locally or on chain
await this.isCreated(url).then(() => {
await this.isCreated(urls).then(() => {
if (this._created) {
throw new Error(Errors[Errors.APOSTILLE_ALREADY_CREATED]);
}
Expand Down Expand Up @@ -118,11 +118,11 @@ export class ApostilleAccount {
initiatorAccount: Initiator,
message: string,
mosaics: Mosaic[] | Mosaic[] = [],
url?: string,
urls?: string,
): Promise<void> {
if (!this._created) {
// we test locally first to avoid testing on chain evrytime we update
await this.isCreated(url);
await this.isCreated(urls);
if (!this._created) {
throw new Error(Errors[Errors.APOSTILLE_NOT_CREATED]);
}
Expand All @@ -148,7 +148,7 @@ export class ApostilleAccount {
* @memberof ApostilleAccount
*/
public async announce(urls?: string): Promise<void> {
await this.isCreated().then(async () => {
await this.isCreated(urls).then(async () => {
if (!this._created) {
throw new Error(Errors[Errors.APOSTILLE_NOT_CREATED]);
}
Expand Down

0 comments on commit 19c68e3

Please sign in to comment.