From 12be2f869eceffe8c1496ce809aa2d97d2429147 Mon Sep 17 00:00:00 2001 From: Hwee-Boon Yar Date: Sat, 13 Jul 2019 17:00:56 +0800 Subject: [PATCH] Fix: ERC20 transfer transaction is not formed correctly --- AlphaWallet/Transfer/Controllers/TransactionConfigurator.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AlphaWallet/Transfer/Controllers/TransactionConfigurator.swift b/AlphaWallet/Transfer/Controllers/TransactionConfigurator.swift index 237d5012e..407431516 100644 --- a/AlphaWallet/Transfer/Controllers/TransactionConfigurator.swift +++ b/AlphaWallet/Transfer/Controllers/TransactionConfigurator.swift @@ -127,7 +127,7 @@ class TransactionConfigurator { do { let function = Function(name: "transfer", parameters: [ABIType.address, ABIType.uint(bits: 256)]) //Note: be careful here with the BigUInt and BigInt, the type needs to be exact - let parameters: [Any] = [transaction.to!, BigUInt(transaction.value)] + let parameters: [Any] = [Address(address: transaction.to!), BigUInt(transaction.value)] let encoder = ABIEncoder() try encoder.encode(function: function, arguments: parameters) self.configuration = TransactionConfiguration(