Files
Dmitry Bespalov f3534bfb2e GH-3203 support optionalNamespaces
- Updated WalletConnectSwiftV2 library to the newest version
    - Evolved `DummySignerFactory` into NullCryptoProvider to fix breaking changes
    - Refactored `approveSession` method to support only safe's chain. Please see link for the reason behind this recommended approach: https://safe-global.notion.site/safe-global/WalletConnect-v2-update-Issues-and-solutions-for-smart-wallets-3fc32fad6af4485fa5823eaebd486819
2023-07-27 18:38:30 +02:00

27 lines
668 B
Swift

//
// NullCryptoProvider.swift
// Multisig
//
// Created by Dirk Jäckel on 16.03.23.
// Copyright © 2023 Gnosis Ltd. All rights reserved.
//
import Foundation
import WalletConnectSigner
// The `CryptoProvider` implementation is a no-op
// because it is used in the App actor, not in the Wallet role
public struct NullCryptoProvider: CryptoProvider {
public enum ProviderError: Error {
case shouldNotBeCalledError
}
public func recoverPubKey(signature: EthereumSignature, message: Data) throws -> Data {
throw ProviderError.shouldNotBeCalledError
}
public func keccak256(_ data: Data) -> Data {
return Data()
}
}