fluencelabs / nox

Rust implementation of the Fluence network peer
https://fluence.network
GNU Affero General Public License v3.0
992 stars 187 forks source link

fix(connector): prefix deal id with 0x in setWorker call #2348

Closed folex closed 3 months ago

folex commented 3 months ago

Description

ETH RPC cannot process the call when DealId is used as an address without 0x

Failed host call "connector" "register_worker" ["7c6a93cdd24c98b07bc542cca7e1ec9e32f1b948","12D3KooWRq9mP27DmStaeduALdCE9exJS3x8Y3ikbESH8vasXNeY",["0b7ff07ad2cee1dc9a718991110f29745f597805ebb3b7aa22dd717f6e711c0d"]] (20ms 323us 348ns): "Failed to register worker: RPC call error: code: -32602, message: invalid argument 0: json: cannot unmarshal hex string without 0x prefix into Go struct field TransactionArgs.to of type common.Address, data:

Motivation

Gotta prefix addresses with 0x

Proposed Changes

Use DealId::to_address()

Checklist

Reviewer Checklist