Skip to content

Commit

Permalink
Merge pull request #754 from airgap-it/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
AndreasGassmann authored Apr 4, 2024
2 parents 3026e3f + 8c5d10b commit 8452a04
Show file tree
Hide file tree
Showing 18 changed files with 182 additions and 162 deletions.
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"version": "4.2.0",
"version": "4.2.1",
"$schema": "node_modules/lerna/schemas/lerna-schema.json"
}
102 changes: 51 additions & 51 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions packages/beacon-blockchain-substrate/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@airgap/beacon-blockchain-substrate",
"version": "4.2.0",
"version": "4.2.1",
"description": "This package adds support for `substrate` based blockchains. It can be used in combination with the `@airgap/beacon-dapp` or `@airgap/beacon-wallet` packages.",
"author": "Andreas Gassmann <[email protected]>",
"homepage": "https://walletbeacon.io",
Expand Down Expand Up @@ -34,7 +34,7 @@
"url": "https://github.com/airgap-it/beacon-sdk/issues"
},
"dependencies": {
"@airgap/beacon-types": "4.2.0",
"@airgap/beacon-ui": "4.2.0"
"@airgap/beacon-types": "4.2.1",
"@airgap/beacon-ui": "4.2.1"
}
}
6 changes: 3 additions & 3 deletions packages/beacon-blockchain-tezos-sapling/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@airgap/beacon-blockchain-tezos-sapling",
"version": "4.2.0",
"version": "4.2.1",
"description": "This package adds support for `tezos-sapling`, the sapling integration on the Tezos blockchain. It can be used in combination with the `@airgap/beacon-dapp` or `@airgap/beacon-wallet` packages.",
"author": "Andreas Gassmann <[email protected]>",
"homepage": "https://walletbeacon.io",
Expand Down Expand Up @@ -34,7 +34,7 @@
"url": "https://github.com/airgap-it/beacon-sdk/issues"
},
"dependencies": {
"@airgap/beacon-types": "4.2.0",
"@airgap/beacon-ui": "4.2.0"
"@airgap/beacon-types": "4.2.1",
"@airgap/beacon-ui": "4.2.1"
}
}
6 changes: 3 additions & 3 deletions packages/beacon-blockchain-tezos/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@airgap/beacon-blockchain-tezos",
"version": "4.2.0",
"version": "4.2.1",
"description": "This package adds support for the `tezos` blockchain. It can be used in combination with the `@airgap/beacon-dapp` or `@airgap/beacon-wallet` packages.",
"author": "Andreas Gassmann <[email protected]>",
"homepage": "https://walletbeacon.io",
Expand Down Expand Up @@ -34,7 +34,7 @@
"url": "https://github.com/airgap-it/beacon-sdk/issues"
},
"dependencies": {
"@airgap/beacon-types": "4.2.0",
"@airgap/beacon-ui": "4.2.0"
"@airgap/beacon-types": "4.2.1",
"@airgap/beacon-ui": "4.2.1"
}
}
6 changes: 3 additions & 3 deletions packages/beacon-core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@airgap/beacon-core",
"version": "4.2.0",
"version": "4.2.1",
"description": "This package contains internal methods that are used by both the dApp and wallet client.",
"author": "Andreas Gassmann <[email protected]>",
"homepage": "https://walletbeacon.io",
Expand Down Expand Up @@ -34,8 +34,8 @@
"url": "https://github.com/airgap-it/beacon-sdk/issues"
},
"dependencies": {
"@airgap/beacon-types": "4.2.0",
"@airgap/beacon-utils": "4.2.0",
"@airgap/beacon-types": "4.2.1",
"@airgap/beacon-utils": "4.2.1",
"@stablelib/ed25519": "^1.0.3",
"@stablelib/nacl": "^1.0.4",
"@stablelib/utf8": "^1.0.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/beacon-core/src/constants.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export const SDK_VERSION: string = '4.2.0'
export const SDK_VERSION: string = '4.2.1'
export const BEACON_VERSION: string = '3'

export const NOTIFICATION_ORACLE_URL: string =
Expand Down
12 changes: 6 additions & 6 deletions packages/beacon-dapp/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@airgap/beacon-dapp",
"version": "4.2.0",
"version": "4.2.1",
"description": "Use this package on your dApp to instanciate a DAppClient object and communicate to wallets.",
"author": "Andreas Gassmann <[email protected]>",
"homepage": "https://walletbeacon.io",
Expand Down Expand Up @@ -35,10 +35,10 @@
"url": "https://github.com/airgap-it/beacon-sdk/issues"
},
"dependencies": {
"@airgap/beacon-core": "4.2.0",
"@airgap/beacon-transport-matrix": "4.2.0",
"@airgap/beacon-transport-postmessage": "4.2.0",
"@airgap/beacon-transport-walletconnect": "4.2.0",
"@airgap/beacon-ui": "4.2.0"
"@airgap/beacon-core": "4.2.1",
"@airgap/beacon-transport-matrix": "4.2.1",
"@airgap/beacon-transport-postmessage": "4.2.1",
"@airgap/beacon-transport-walletconnect": "4.2.1",
"@airgap/beacon-ui": "4.2.1"
}
}
17 changes: 14 additions & 3 deletions packages/beacon-dapp/src/dapp-client/DAppClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ import {
SimulatedProofOfEventChallengeRequestInput,
SimulatedProofOfEventChallengeRequest,
SimulatedProofOfEventChallengeResponse,
RequestSimulatedProofOfEventChallengeInput
RequestSimulatedProofOfEventChallengeInput,
TransportStatus
// PermissionRequestV3
// RequestEncryptPayloadInput,
// EncryptPayloadResponseOutput,
Expand Down Expand Up @@ -1341,7 +1342,6 @@ export class DAppClient extends Client {
logger.log('requestPermissions', JSON.stringify(accountInfo))

await this.accountManager.addAccount(accountInfo)
await this.setActiveAccount(accountInfo)

const output: PermissionResponseOutput = {
...message,
Expand Down Expand Up @@ -2328,12 +2328,23 @@ export class DAppClient extends Client {
}

public async disconnect() {
if (!this._transport.isResolved()) {
throw new Error('No transport available.')
}

const transport = await this.transport

if (transport.connectionStatus === TransportStatus.NOT_CONNECTED) {
throw new Error('Not connected.')
}

await this.createStateSnapshot()
this.sendMetrics('performance-metrics/save', await this.buildPayload('disconnect', 'start'))
this.postMessageTransport = undefined
this.p2pTransport = undefined
this.walletConnectTransport = undefined
await Promise.all([this.clearActiveAccount(), (await this.transport).disconnect()])
await this.clearActiveAccount()
await transport.disconnect()
this.sendMetrics('performance-metrics/save', await this.buildPayload('disconnect', 'success'))
}

Expand Down
22 changes: 11 additions & 11 deletions packages/beacon-sdk/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@airgap/beacon-sdk",
"version": "4.2.0",
"version": "4.2.1",
"description": "The `beacon-sdk` simplifies and abstracts the communication between dApps and wallets over different transport layers.",
"author": "Andreas Gassmann <[email protected]>",
"homepage": "https://walletbeacon.io",
Expand Down Expand Up @@ -35,15 +35,15 @@
"url": "https://github.com/airgap-it/beacon-sdk/issues"
},
"dependencies": {
"@airgap/beacon-blockchain-substrate": "4.2.0",
"@airgap/beacon-blockchain-tezos": "4.2.0",
"@airgap/beacon-core": "4.2.0",
"@airgap/beacon-dapp": "4.2.0",
"@airgap/beacon-transport-matrix": "4.2.0",
"@airgap/beacon-transport-postmessage": "4.2.0",
"@airgap/beacon-types": "4.2.0",
"@airgap/beacon-ui": "4.2.0",
"@airgap/beacon-utils": "4.2.0",
"@airgap/beacon-wallet": "4.2.0"
"@airgap/beacon-blockchain-substrate": "4.2.1",
"@airgap/beacon-blockchain-tezos": "4.2.1",
"@airgap/beacon-core": "4.2.1",
"@airgap/beacon-dapp": "4.2.1",
"@airgap/beacon-transport-matrix": "4.2.1",
"@airgap/beacon-transport-postmessage": "4.2.1",
"@airgap/beacon-types": "4.2.1",
"@airgap/beacon-ui": "4.2.1",
"@airgap/beacon-utils": "4.2.1",
"@airgap/beacon-wallet": "4.2.1"
}
}
6 changes: 3 additions & 3 deletions packages/beacon-transport-matrix/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@airgap/beacon-transport-matrix",
"version": "4.2.0",
"version": "4.2.1",
"description": "This package contains methods to facilitate communication over the Beacon network, a decentralised P2P network that is based on the matrix protocol.",
"author": "Andreas Gassmann <[email protected]>",
"homepage": "https://walletbeacon.io",
Expand Down Expand Up @@ -34,8 +34,8 @@
"url": "https://github.com/airgap-it/beacon-sdk/issues"
},
"dependencies": {
"@airgap/beacon-core": "4.2.0",
"@airgap/beacon-utils": "4.2.0",
"@airgap/beacon-core": "4.2.1",
"@airgap/beacon-utils": "4.2.1",
"axios": "^1.6.2"
}
}
Loading

0 comments on commit 8452a04

Please sign in to comment.