Skip to content

Commit

Permalink
[web] - workaround contracts bug (#618)
Browse files Browse the repository at this point in the history
  • Loading branch information
Roman Matusevich authored Oct 27, 2023
1 parent f7e038f commit a3ded19
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions web/src/v6.1.0/blockchain/dao.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,17 @@ export class Dao extends BaseContract {
async getDetails() {
const details = await this.runLocal('getDetails', {})
const { _isTaskRedeployed } = await this.runLocal('_isTaskRedeployed', {})

// Fix contracts bug with `isUpgraded` flag
const prev_addr = await this.getPrevious()
if (prev_addr) {
const prev_dao = new Dao(this.client, prev_addr)
const prev_ver = await prev_dao.getVersion()
if (prev_ver === '1.0.0') {
details.isUpgraded = true
}
}

return { ...details, isTaskUpgraded: _isTaskRedeployed }
}

Expand Down

0 comments on commit a3ded19

Please sign in to comment.