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

Wrapper: hotfix isForwarder() check on apps #372

Merged
merged 2 commits into from Sep 1, 2019
Merged
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.

Always

Just for now

Prev

Wrapper: only override isForwarder setting if it's set to true

  • Loading branch information...
sohkai committed Sep 1, 2019
commit e5071ea35ca8b06171c9ec2285c66cf2c0fc6f04
@@ -549,15 +549,24 @@ export default class Aragon {
//
// We check if the app's ABI actually has `isForwarder()` declared, and if not, override
// the isForwarder setting to false.
const overrideIsForwarder = Boolean(appInfo && appInfo.abi) &&
let isForwarderOverride = {}
if (
app.isForwarder &&
appInfo &&
Array.isArray(appInfo.abi) &&
!appInfo.abi.some(({ type, name }) => type === 'function' && name === 'isForwarder')
) {
isForwarderOverride = {
isForwarder: false
}
}

return {
...appInfo,
// Override the fetched appInfo with the actual app proxy's values to avoid mismatches
...app,
// isForwarder override (see above)
isForwarder: overrideIsForwarder ? false : app.isForwarder
...isForwarderOverride
}
})
)
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.