diff --git a/AlphaWallet/Tokens/Coordinators/GetContractInteractions.swift b/AlphaWallet/Tokens/Coordinators/GetContractInteractions.swift index 53c1cd0b0..f91ce443b 100644 --- a/AlphaWallet/Tokens/Coordinators/GetContractInteractions.swift +++ b/AlphaWallet/Tokens/Coordinators/GetContractInteractions.swift @@ -34,7 +34,7 @@ class GetContractInteractions { from: transactionJson["from"].stringValue, to: transactionJson["to"].stringValue, contract: AlphaWallet.Address(uncheckedAgainstNullAddress: transactionJson["contractAddress"].stringValue), - type: "erc20TokenTransfer", + type: OperationType.erc20TokenTransfer.rawValue, value: transactionJson["value"].stringValue, symbol: transactionJson["tokenSymbol"].stringValue, name: transactionJson["tokenName"].stringValue, diff --git a/AlphaWallet/Transactions/Storage/Transaction.swift b/AlphaWallet/Transactions/Storage/Transaction.swift index a43ff370b..9f796bcc5 100644 --- a/AlphaWallet/Transactions/Storage/Transaction.swift +++ b/AlphaWallet/Transactions/Storage/Transaction.swift @@ -118,7 +118,7 @@ extension Transaction { //Compiler thinks it's a `Slice` if don't explicitly state the type, so we have to split into 2 `if`s let recipientData: Data = data[4..<(4 + 32)][4 + 12..<(4 + 32)] if let recipient = AlphaWallet.Address(string: recipientData.hexEncoded) { - return (operations: [LocalizedOperationObject(from: from.eip55String, to: recipient.eip55String, contract: contract, type: "erc20TokenTransfer", value: String(value), symbol: token.symbol, name: token.name, decimals: token.decimals)], isErc20Interaction: true) + return (operations: [LocalizedOperationObject(from: from.eip55String, to: recipient.eip55String, contract: contract, type: OperationType.erc20TokenTransfer.rawValue, value: String(value), symbol: token.symbol, name: token.name, decimals: token.decimals)], isErc20Interaction: true) } } return (operations: .init(), isErc20Interaction: false)