@bloks/api
Advanced tools
Comparing version 3.5.84 to 3.5.85
{ | ||
"name": "@bloks/api", | ||
"version": "3.5.84", | ||
"version": "3.5.85", | ||
"description": "", | ||
@@ -13,4 +13,4 @@ "publishConfig": { | ||
"dependencies": { | ||
"@bloks/constants": "^3.5.82", | ||
"@bloks/utils": "^3.5.84", | ||
"@bloks/constants": "^3.5.85", | ||
"@bloks/utils": "^3.5.85", | ||
"@eoscafe/hyperion": "^3.2.4", | ||
@@ -23,3 +23,3 @@ "@eoscafe/light-api": "^1.0.0", | ||
}, | ||
"gitHead": "8ac186f2e96449049a0b4b3209d6fd1a30f67321" | ||
"gitHead": "abd473b5913dde084f491697a5b5ac8ba6b92de1" | ||
} |
@@ -609,10 +609,16 @@ import axios from 'axios' | ||
getAccountsMsigProposals (account) { | ||
return this.eos.get_table_rows({ | ||
json: true, | ||
code: constants.EOSIO_MSIG, | ||
scope: encodeName(account, false), | ||
table: constants.EOSIO_MSIG_APPROVALS_TABLE, | ||
limit: -1 | ||
}) | ||
async getAccountsMsigProposals (account) { | ||
try { | ||
const { rows } = await this.eos.get_table_rows({ | ||
json: true, | ||
code: constants.EOSIO_MSIG, | ||
scope: encodeName(account, false), | ||
table: constants.EOSIO_MSIG_APPROVALS_TABLE, | ||
limit: -1 | ||
}) | ||
return rows | ||
} catch (e) { | ||
console.log(e) | ||
return [] | ||
} | ||
} | ||
@@ -1073,3 +1079,25 @@ | ||
} else { | ||
return [] | ||
let rows = [] | ||
let lower_bound = '' | ||
do { | ||
const result = await this.eos.get_table_by_scope({ | ||
json: true, | ||
code: 'eosio.msig', | ||
limit: 100, | ||
lower_bound: lower_bound, | ||
table: 'proposal', | ||
upper_bound: '' | ||
}) | ||
lower_bound = result.more | ||
rows = rows.concat(result.rows) | ||
} while (lower_bound) | ||
return rows.map( | ||
row => ({ | ||
scope: row.scope, | ||
rows: Array(row.count).fill({ key: '' }) | ||
}) | ||
) | ||
} | ||
@@ -1367,4 +1395,4 @@ } | ||
) | ||
.plus(1) | ||
.toString() | ||
.plus(1) | ||
.toString() | ||
} while (more) | ||
@@ -1550,3 +1578,11 @@ | ||
rows = rows.concat(result.rows) | ||
if (more) lower_bound = BigNumber(encodeName(rows[rows.length - 1].to, false)).plus(1).toString() | ||
if (more) { | ||
lower_bound = BigNumber( | ||
encodeName( | ||
rows[rows.length - 1].to, false | ||
) | ||
) | ||
.plus(1) | ||
.toString() | ||
} | ||
} while (more) | ||
@@ -1665,14 +1701,22 @@ | ||
getProposalsByProposer (proposer) { | ||
return this.eos.get_table_rows({ | ||
json: true, | ||
code: constants.EOSFORUM, | ||
scope: constants.EOSFORUM, | ||
table: constants.EOSIO_MSIG_PROPOSALS_TABLE, | ||
key_name: 'by_proposer', | ||
key_type: 'i64', | ||
lower_bound: encodeName(proposer, false), | ||
upper_bound: BigNumber(encodeName(proposer, false)).plus(1).toString(), | ||
index_position: 2 | ||
}).then(result => result.rows) | ||
async getProposalsByProposer (proposer) { | ||
try { | ||
const { rows } = await this.eos.get_table_rows({ | ||
json: true, | ||
code: constants.EOSFORUM, | ||
scope: constants.EOSFORUM, | ||
table: constants.EOSIO_MSIG_PROPOSALS_TABLE, | ||
key_name: 'by_proposer', | ||
key_type: 'i64', | ||
lower_bound: encodeName(proposer, false), | ||
upper_bound: BigNumber(encodeName(proposer, false)).plus(1).toString(), | ||
index_position: 2, | ||
limit: 100 | ||
}) | ||
return rows | ||
} catch (e) { | ||
console.log(e) | ||
return [] | ||
} | ||
} | ||
@@ -1679,0 +1723,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
98595
1719
Updated@bloks/constants@^3.5.85
Updated@bloks/utils@^3.5.85