Skip to content
This repository was archived by the owner on Oct 19, 2024. It is now read-only.

fix: contract creation on trezor #695

Merged
merged 4 commits into from
Dec 15, 2021

Conversation

joshieDo
Copy link
Contributor

Motivation

To create a contract, it's required to pass the to address as an empty string.

Solution

  • remove defaulting to the 0x0 address, if no address is passed
  • handle to as an empty string

It should show on the device:

0 Wei ETH
new contract?"

PR Checklist

  • Added Tests
  • Added Documentation
  • Updated the changelog

Copy link
Owner

@gakonst gakonst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 small change

Comment on lines 78 to 83
// Contract Creation
if value.is_empty() {
"".to_string()
} else {
unimplemented!()
}
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

think we should just be erroring here if a user passes an ENS name instead of silently letting it through in the empty case or panicking if it's not empty?

@gakonst gakonst merged commit 5bf3f73 into gakonst:master Dec 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants