(Fix) Modules not shown in Advanced Settings#1516
Conversation
- also, reused the recently created method to avoid repetitions for the following SafeServiceUri-dependant URIs
|
CLA Assistant Lite All Contributors have signed the CLA. |
ESLint Summary View Full Report
Report generated by eslint-plus-action |
|
Travis automatic deployment: |
|
Travis automatic deployment: |
src/logic/safe/utils/modules.ts
Outdated
| * @returns Array<ModulePair> | null | undefined | ||
| */ | ||
| export const getModules = async (safeInfo: SafeInfo | void): Promise<Array<ModulePair> | null | undefined> => { | ||
| if (safeInfo) { |
There was a problem hiding this comment.
can you inverse the condition? if (!safeInfo) that will remove 1 nested level
|
@fernandomg there are some conflicts |
# Conflicts: # src/config/index.ts # src/logic/currencyValues/api/fetchTokenCurrenciesBalances.ts
|
Travis automatic deployment: |
|
Travis automatic deployment: |
|
Travis automatic deployment: |
|
Tried in a safe 1.0.0 Safe: https://pr1516--safereact.review.gnosisdev.com/app/#/safes/0xeca13481F8514752dC08106c7A265c85caFa563E/settings |
|
There is a issue with tx not being able to be executed when a tx is "off chain", it fails on its first signature. |
- 310 made POST requests fail
@francovenica fixed, thanks so much for the catch! |
|
Travis automatic deployment: |
|
Tried again In this safe https://pr1516--safereact.review.gnosisdev.com/app/#/safes/0x9913B9180C20C6b0F21B6480c84422F6ebc4B808/transactions I was able to do a regular "Send Funds" tx and add the module that Tobias pointed out in the issue ticket. Looks good to me |
This PR closes #1494, by changing the way modules information is retrieved.
The error: was in assuming that
getModulesPaginatedwas present in all Safe's versions, but it wasn't implemented until v1.1.1.The fix changes the strategy by using the SafeInfo (
safes/{safeAddress}) transactions service endpoint, which returns modules information and more.The only restriction that the transaction service has is that it's using
getModulesmethod, which in versions >=v1.1.1 will return up to 10 modules.So, if we face that scenario, we'll be querying
getModulesPaginatedas a last resource.More info at https://github.com/gnosis/safe-react/blob/fix/1494-modules-not-shown/src/logic/safe/utils/modules.ts#L40