essentiaone / essentia-bridges-api-ios

Bridges API wrapper for iOS application.
MIT License
10 stars 4 forks source link

help about eth transaction issue #30

Closed mousehaohao closed 5 years ago

mousehaohao commented 5 years ago

Hello, impul, It's me again, Thanks for you patient. here's another issue found when I send the transaction, I need to get the gas estimate first, but return error.

"Essentia🌏 curl https://b3.essentia.network/api/v1/ethereum/gas/estimate \\\n\t-X POST \\\n\t-H \'Content-Type: application/json\' \\\n\t-d \'{\n  \"data\" : \"\",\n  \"from\" : \"0x927244ea76dd2d7c42f85efb86a9333cd2f39a67\",\n  \"to\" : \"0xf3cb87c75f7b16c569154da1eec37e40b9aa3b1c\"\n}\'"

When I use the post man to do the direct visist.

https://b3.essentia.network/api/v1/ethereum/gas/estimate

POST

{"data":"","from":"0x927244ea76dd2d7c42f85efb86a9333cd2f39a67","to":"0xf3cb87c75f7b16c569154da1eec37e40b9aa3b1c"}

the response is 502, so how can I debug or fix this? thanks :)

impul commented 5 years ago

@mousehaohao, if you do not have data, then send "0x"

   ethWallet?.getGasEstimate(from: address, to: destinationAddrss, data: "0x", result: { (result) in
            print(result)
            expectation.fulfill()
        })
impul commented 5 years ago

But anyway i will fix this in next release.

mousehaohao commented 5 years ago

got it, :) Thanks.