diff --git a/BeaconBlockchainSubstrate.podspec b/BeaconBlockchainSubstrate.podspec index 8c6c5b6..bc3950e 100644 --- a/BeaconBlockchainSubstrate.podspec +++ b/BeaconBlockchainSubstrate.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |spec| spec.name = "BeaconBlockchainSubstrate" - spec.version = "3.2.2" + spec.version = "3.2.3" spec.summary = "Beacon is an implementation of the wallet interaction standard tzip-10 which describes the connection of a dApp with a wallet. BeaconBlockchainSubstrate provides a set of messages, utility functions and other components specific for Substrate blockchains." spec.description = <<-DESC Beacon is an implementation of the Tezos wallet interaction standard tzip-10 which describes the connection of a dApp with a wallet. BeaconBlockchainSubstrate provides a set of messages, utility functions and other components specific for Substrate blockchains. diff --git a/BeaconBlockchainTezos.podspec b/BeaconBlockchainTezos.podspec index 60b589d..794b138 100644 --- a/BeaconBlockchainTezos.podspec +++ b/BeaconBlockchainTezos.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |spec| spec.name = "BeaconBlockchainTezos" - spec.version = "3.2.2" + spec.version = "3.2.3" spec.summary = "Beacon is an implementation of the wallet interaction standard tzip-10 which describes the connection of a dApp with a wallet. BeaconBlockchainTezos provides a set of messages, utility functions and other components specific for the Tezos blockchain." spec.description = <<-DESC Beacon is an implementation of the Tezos wallet interaction standard tzip-10 which describes the connection of a dApp with a wallet. BeaconBlockchainTezos provides a set of messages, utility functions and other components specific for the Tezos blockchain. diff --git a/BeaconClientDApp.podspec b/BeaconClientDApp.podspec index d63e6fe..4da9583 100644 --- a/BeaconClientDApp.podspec +++ b/BeaconClientDApp.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |spec| spec.name = "BeaconClientDApp" - spec.version = "3.2.2" + spec.version = "3.2.3" spec.summary = "Beacon is an implementation of the wallet interaction standard tzip-10 which describes the connection of a dApp with a wallet. BeaconClientDApp provides the Beacon implementation for dApps." spec.description = <<-DESC Beacon is an implementation of the Tezos wallet interaction standard tzip-10 which describes the connection of a dApp with a wallet. BeaconClientDApp provides the Beacon implementation for dApps. diff --git a/BeaconClientWallet.podspec b/BeaconClientWallet.podspec index e6b4195..ee926cd 100644 --- a/BeaconClientWallet.podspec +++ b/BeaconClientWallet.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |spec| spec.name = "BeaconClientWallet" - spec.version = "3.2.2" + spec.version = "3.2.3" spec.summary = "Beacon is an implementation of the wallet interaction standard tzip-10 which describes the connection of a dApp with a wallet. BeaconClientWallet provides the Beacon implementation for wallets." spec.description = <<-DESC Beacon is an implementation of the Tezos wallet interaction standard tzip-10 which describes the connection of a dApp with a wallet. BeaconClientWallet provides the Beacon implementation for wallets. diff --git a/BeaconCore.podspec b/BeaconCore.podspec index 81c7fb3..0ebd04e 100644 --- a/BeaconCore.podspec +++ b/BeaconCore.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |spec| spec.name = "BeaconCore" - spec.version = "3.2.2" + spec.version = "3.2.3" spec.summary = "Beacon is an implementation of the wallet interaction standard tzip-10 which describes the connection of a dApp with a wallet. BeaconCore is a common base for other targets." spec.description = <<-DESC Beacon is an implementation of the Tezos wallet interaction standard tzip-10 which describes the connection of a dApp with a wallet. BeaconCore is a common base for other targets. diff --git a/BeaconTransportP2PMatrix.podspec b/BeaconTransportP2PMatrix.podspec index 49db829..aec50e8 100644 --- a/BeaconTransportP2PMatrix.podspec +++ b/BeaconTransportP2PMatrix.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |spec| spec.name = "BeaconTransportP2PMatrix" - spec.version = "3.2.2" + spec.version = "3.2.3" spec.summary = "Beacon is an implementation of the wallet interaction standard tzip-10 which describes the connection of a dApp with a wallet. BeaconTransportP2PMatrix provides a P2P implementation which uses Matrix network for the communication." spec.description = <<-DESC Beacon is an implementation of the Tezos wallet interaction standard tzip-10 which describes the connection of a dApp with a wallet. BeaconTransportP2PMatrix provides a P2P implementation which uses Matrix network for the communication." diff --git a/Sources/Core/Transport/P2P/P2P.swift b/Sources/Core/Transport/P2P/P2P.swift index 4aec49c..0615692 100644 --- a/Sources/Core/Transport/P2P/P2P.swift +++ b/Sources/Core/Transport/P2P/P2P.swift @@ -61,7 +61,15 @@ public extension Transport { p2pPeers.forEachAsync( body: { (peer: Beacon.P2PPeer, innerCompletion: @escaping (Result<(), Swift.Error>) -> ()) -> () in if !peer.isPaired { - self.client.sendPairingResponse(to: peer, completion: innerCompletion) + self.client.sendPairingResponse(to: peer) { innerResult in + guard innerResult.isSuccess(else: innerCompletion) else { return } + self.storageManager.add( + [.p2p(.init(from: peer, isPaired: true))], + overwrite: true, + distinguishBy: { [$0.id] }, + completion: innerCompletion + ) + } } else { innerCompletion(.success(())) }