Releases: airgap-it/beacon-sdk
v2.2.8
2.2.8 (2021-06-03)
Fixes
- p2p: Cached rooms are updated whenever a message is received or a new invite is received. This prevents peers from sending messages to "old" rooms where the other peer potentially no longer has access to
- p2p: Improved the behaviour of the "re-pairing" for previously connected dApps. To prevent old state from affecting the connection, a new room is now always created when a connection is initialised
- p2p: "Reset Connection" now works properly by making sure all old state is reset
- p2p: Deterministically select the relay server based on the public key so it's always the same on by default
- p2p: The SDK now resumes the connection after the server was unreachable for a while
v2.2.7
2.2.7 (2021-05-16)
Features
- network: Add Granadanet
- p2p: Add second beacon-node to default nodes array
- p2p: Improve reconnect behaviour if the previously used node is not reachable
Fix
- ui: Limit toast width, which was causing styling issues on some devices
v2.2.6
2.2.6 (2021-04-29)
Fixes
- ui: Ignore styling from parent page
- types: Make operation request properties optional instead of omitting them
v2.2.5
2.2.5 (2021-04-26)
Fixes
- p2p: Remove unknown rooms and retry on failure
v2.2.4
Features
- florencenet: Add Florencenet
- p2p: Support federated matrix servers
Fixes
- p2p: Fix timing issues during connection setup to improve reliability
v2.2.3
Fixes
- UI: Make alert scrollable
v2.2.2
Features
- temple: Rename "Thanos" to "Temple"
- kukai: Add edonet URL
Fixes
- error: Fix removing of dom element that would result in an error
v2.2.1
Fixes
- signing: The validation of the
OPERATION
andMICHELINE
payloads is now correct - alert: The page no longer scrolls down when the alert opens
- alert: Alert width fixed on mobile
- toast: Toasts are now sticky to the top of the window, not the top of the page
- toast: Toast height fixed on iOS
- toast: If an acknowledge message is received after the response, it will be ignored
- toast: The close button will now always be shown in the "awaiting" state
- toast: Remove unnecessary "href" from link in error toast
- toast: New toasts that are triggered while another one is being shown will now be handled correctly
v2.2.0
2.2.0 (2021-02-03)
Features
-
UI Improvements: We changed the flow of the UI from the ground up. When a new message is sent from the dApp, the "request sent" toast now sticks to the top right of the page. It shows a loading animation and also includes the name (and logo) of the wallet where the request has been sent to. The toast will update whenever new information is received from the wallet (eg. request acknowledgement or response). Only the pairing information and details of errors will be displayed in a blocking alert. As always, all of these UI elements can be overwritten if dApp developers want to use their own UI.
-
UI Improvements: Default UI Elements in Beacon now use Shadow Dom. This will encapsulate the styling of the UI elements, so the styling of the page will no longer affect the styling of the beacon-sdk UI elements, and vice versa.
-
Dark Mode: The dApp developer can now choose between a "dark" and "light" color theme. This will change the look of both alerts and toasts.
-
Errors: The
beacon-sdk
now allows for RPC-Errors to be passed in theTRANSACTION_INVALID_ERROR
response. Errors MUST be displayed in the wallet. This change does not change that. It simply allows dApps that expect certain errors to provide more insights into what went wrong. dApps are not required to display the details of an error, but they can choose to do so if it improves the user experience. -
Debug: New debug methods have been introduced. To activate logs from the
beacon-sdk
during development, it is possible to callsetDebugEnabled(true)
. This will enable logs throughout thebeacon-sdk
.
The beacon-sdk
will now also listen to the beaconSdkDebugEnabled
variable on the global window object. This will allow browser extensions (eg. Spire) to set the debug flag to true on production websites, which will help debugging on production dApps.
- UI Elements: All default UI Elements / Event Handlers can be removed at once by setting the
disableDefaultEvents
flag in theDAppClientOptions
to true. Keep in mind that this will also disable the Pairing Alert. If you want to keep the Pairing Alert, you will have to add those default handlers again. An example would be:
const client = new DAppClient({
name: 'My Sample DApp',
disableDefaultEvents: true, // Disable all events / UI. This also disables the pairing alert.
eventHandlers: {
// To keep the pairing alert, we have to add the following default event handlers back
[BeaconEvent.PAIR_INIT]: {
handler: defaultEventCallbacks.PAIR_INIT
},
[BeaconEvent.PAIR_SUCCESS]: {
handler: defaultEventCallbacks.PAIR_SUCCESS
}
}
})
- Alert: A click outside the alert will now dismiss the alert
- Logs: Add warning logs when the QR code gets too big and when muliple Clients are created
- SigningType: Add
OPERATION
andMICHELINE
SigningTypes. The payload of theOPERATION
type has to start with03
and theMICHELINE
type has to start with05
- Beacon Extension: The "Beacon Extension" has been renamed to "Spire".
- dApp / Wallet metadata: The dApp and wallet metadata (name and icon) are now included in the pairing request / response
Fixes
- Matrix Performace Improvements: Fixed a timing issue that lead to slower responses
- DAppClient:
setActiveAccount
now updates and persists the active peer - Types: The type of
matrixNodes
was incorrect - Docs: Fixed a typo in link a docs link
v2.1.0
- Add Edonet
- Remove Carthagenet
- Accessibility improvements to navigate in the pairing alert
- New method on the
DAppClient
calledclearActiveAccount()
, which is just a wrapper forsetActiveAccount()