Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transactions are not sending #67

Open
Emin-Emini opened this issue Jun 26, 2022 · 0 comments
Open

Transactions are not sending #67

Emin-Emini opened this issue Jun 26, 2022 · 0 comments

Comments

@Emin-Emini
Copy link

I tried to sign transaction exactly as in documentation:

func signTransaction() {
        guard let amountString = amountTextField.text else { return }
        guard let address = addressTextField.text else { return }
        let amount = Int((Double(amountString) ?? 0.0) * ethDivident)
        
        let signer = EIP155Signer(chainId: 1)
        let rawTransaction1 = EthereumRawTransaction(
            value: Wei("\(amount)") ?? 0,
            to: "\(address)",
            gasPrice: Int(gasPrice),
            gasLimit: 21000,
            nonce: 2
        )
        guard let signed = try? signer.hash(rawTransaction: rawTransaction1).toHexString() else { return }
        print(signed)
        
        
    }

It's printing transaction hash, but is not substracting any ethereum from the wallet. Also when I check the transaction on Etherium Scan is not showin at all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant