Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Move pushData to pushServer (v0.8.x) #61
In order to keep the dappName (Issue #60), it needs to detached both from the Dapp itself and the Bridge server to control the way push notifications are displayed.
The first proposal for the issue #60 was to completely remove it. However following the discussion on the WalletConnect forum thread (https://discuss.walletconnect.org/t/push-server-metadata/123), the consensus was that this was a critical change for the WalletConnect UX and it should be reversed.
In order to reverse it, it will include a significant tech spec change on how the current architecture is handled. The second proposal is to make the Bridge server "dumber" by removing all logic related to the push notification (pushType and pushToken) and simply trigger a notification using the provided pushWebhook and the already known sessionID. To achieve this, the session creation flow will complete the session request between the Dapp and the Wallet and be followed by an HTTP request to the Push server to store the push notification data plus some other metadata.
Push server will now be in charge to handle this data and format the push notification display using the following:
The language parameter should follow the ISO 639-1 language codes standard. This additional parameter will provide localization based on the user's device.
Additionally, the user can change to not share the metadata with the push server in order to preserve privacy.
Furthermore this improves the flexibility of the Protocol to support different levels of privacy both for Wallet providers and users themselves.