Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(Oracle): remove unnecessary binding #885

Merged
merged 2 commits into from
Jan 31, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions es/ae/oracle.js
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ async function registerOracle (queryFormat, responseFormat, options = {}) {
}))
return {
...(await this.send(oracleRegisterTx, opt)),
...(await getOracleObject.bind(this)(`ok_${accountId.slice(3)}`))
...(await this.getOracleObject(`ok_${accountId.slice(3)}`))
}
}

Expand Down Expand Up @@ -194,7 +194,7 @@ async function postQueryToOracle (oracleId, query, options = {}) {
}))
return {
...(await this.send(oracleRegisterTx, opt)),
...(await (await getOracleObject.bind(this)(oracleId)).getQuery(queryId))
...(await (await this.getOracleObject(oracleId)).getQuery(queryId))
}
}

Expand Down Expand Up @@ -222,7 +222,7 @@ async function extendOracleTtl (oracleId, oracleTtl, options = {}) {
}))
return {
...(await this.send(oracleExtendTx, opt)),
...(await getOracleObject.bind(this)(oracleId))
...(await this.getOracleObject(oracleId))
}
}

Expand Down Expand Up @@ -253,7 +253,7 @@ async function respondToQuery (oracleId, queryId, response, options = {}) {
}))
return {
...(await this.send(oracleRespondTx, opt)),
...(await getOracleObject.bind(this)(oracleId))
...(await this.getOracleObject(oracleId))
}
}

Expand Down