Skip to content
This repository was archived by the owner on Jun 8, 2026. It is now read-only.

Documentation, reorganization and additon of new methods - #142

Merged
Germán Martínez (germartinez) merged 27 commits into
developmentfrom
new-methods
Feb 10, 2021
Merged

Documentation, reorganization and additon of new methods#142
Germán Martínez (germartinez) merged 27 commits into
developmentfrom
new-methods

Conversation

@germartinez

@germartinez Germán Martínez (germartinez) commented Feb 8, 2021

Copy link
Copy Markdown
Contributor

Check #133, #89 and #139

@germartinez Germán Martínez (germartinez) changed the title Reorganization and additon of new methods Documentation, reorganization and additon of new methods Feb 8, 2021
Comment thread src/CPK.ts Outdated
*/
get address(): Promise<Address | undefined> {
if (this.#safeAppsSdkConnector?.isSafeApp) {
return (async () => this.#safeAppsSdkConnector && (await this.#safeAppsSdkConnector.getSafeInfo()).safeAddress)()

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm definitely lacking knowledge on the architecture of cpk and stuff, but is it possible to cache the address when connecting?

Comment on lines +14 to +15
this.#appsSdk.getSafeInfo().then((appInfo: SafeInfo) => {
this.#isSafeApp = !!appInfo.safeAddress

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

here you go, I think you can just save the address and remove the async getter

Comment thread src/utils/networks.ts Outdated
@@ -0,0 +1,19 @@
type Networks = {
[key: string]: number

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to be more precise I think we can also define a type for network names

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants