Skip to content

We can't access activatedSocialNetworkUI outside packages/mask now, although it should be a feature of a runtime for plugin. #6233

Description

@UncleBill

We can't access activatedSocialNetworkUI outside packages/mask now, although it should be a feature of a runtime for plugin.

I once introduced runtime at #5632 (comment) .

<chain-runtime>
  <ui-runtime>
    <plugin-runtime>{children}</plugin-runtime>
  </ui-runtime>
</chain-runtime>

We can separate different concepts into individual layers, and we can implement each of them across platforms. iOS, android, and we might have desktop in the future, and even for mocking/testing.

If we implement mocking runtime, we can easily test with headless JS runtime. For example, we can turn UI interaction into function-call.

const share = () => Promise.resolve(true)
const pickToken = () => Promise.resolve({name: 'Mask'})
const web3Provider = () => connnectToLocalNetwork()

Originally posted by @UncleBill in #6181 (comment)

Activity

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions