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

Refactor RPC and rewrite aepp-rpc to TypeScript #1542

Merged
merged 11 commits into from
May 30, 2022
Merged

Commits on May 27, 2022

  1. refactor(AeppRpc)!: make to init in sync

    BREAKING CHANGE: AeppRpc doesn't accept `connection` anymore
    Use `connectToWallet` method instead.
    davidyuk committed May 27, 2022
    Configuration menu
    Copy the full SHA
    86c9d6c View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    de4c21d View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    e2b5186 View commit details
    Browse the repository at this point in the history
  4. refactor(rpc-client)!: provide method handlers instead of onMessage

    BREAKING CHANGE: `handlers` parameter is removed in RpcClient
    Provide a `methods` parameter instead of `handlers[0]`.
    Provide an `onDisconnect` parameter instead of `handlers[1]`.
    davidyuk committed May 27, 2022
    Configuration menu
    Copy the full SHA
    5f1a007 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    c8151ff View commit details
    Browse the repository at this point in the history

Commits on May 28, 2022

  1. Configuration menu
    Copy the full SHA
    4b41b89 View commit details
    Browse the repository at this point in the history
  2. refactor(rpc-client)!: add notify method

    BREAKING CHANGE: `sendMessage` of RpcClient is a private method
    Use `request` or `notify` instead.
    
    BREAKING CHANGE: `shareWalletInfo` of WalletRpc accepts rpcClientId instead of callback
    For example, rewrite
    ```
    const connection = new BrowserRuntimeConnection({ port })
    aeSdk.addRpcClient(connection)
    aeSdk.shareWalletInfo(port.postMessage.bind(port))
    ```
    to
    ```
    const connection = new BrowserRuntimeConnection({ port })
    const rpcClientId = aeSdk.addRpcClient(connection)
    aeSdk.shareWalletInfo(rpcClientId)
    ```
    davidyuk committed May 28, 2022
    Configuration menu
    Copy the full SHA
    9e97a1a View commit details
    Browse the repository at this point in the history

Commits on May 29, 2022

  1. refactor(aepp-rpc): depend on simplified version of RpcClient

    BREAKING CHANGE: `connectToWallet` accepts wallet connection as the first argument
    See connect-aepp-to-wallet.md for details.
    
    BREAKING CHANGE: `disconnectWallet` runs in sync and `sendDisconnect` arg removed
    So, aepp would always send `closeConnection` notification.
    
    BREAKING CHANGE: `sendConnectRequest` removed
    Use `connectToWallet` instead.
    davidyuk committed May 29, 2022
    Configuration menu
    Copy the full SHA
    f329549 View commit details
    Browse the repository at this point in the history
  2. refactor: drop DuplicateCallbackError error

    Message counted is maintained locally, so this shouldn't be a case
    davidyuk committed May 29, 2022
    Configuration menu
    Copy the full SHA
    b3a2af6 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    b8f76ca View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    1a8e830 View commit details
    Browse the repository at this point in the history