mirror of
https://github.com/luxfi/safe-ios.git
synced 2026-10-30 15:19:20 +00:00
- 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
27 lines
668 B
Swift
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()
|
|
}
|
|
}
|