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

client/eth: Use bytes as string in key import. #1335

Merged
merged 2 commits into from
Dec 11, 2021

Conversation

JoeGruffins
Copy link
Member

@JoeGruffins JoeGruffins commented Dec 8, 2021

client/eth: Use bytes as string in key import.

This change is needed because unlocking will use the bytes as a string.

Also set the simnet contract address.


client/eth: Remove unused config. 

@JoeGruffins
Copy link
Member Author

JoeGruffins commented Dec 8, 2021

Could also change Unlock to use the bytes encoded as hex, but other wallets look to just use string().

Also, I believe the simnet contract address is deterministic as long as it's sent from the same account with the same nonce and the same txdata.

Not sure about this test failure. Am not seeing locally.

Also, need to remove the comments in dexc/importlgpl.go to use in dexc, in case anyone forgets while building. Also need to do go build --tags lgpl.

@JoeGruffins JoeGruffins changed the title eth/client: Use bytes as string in key import. client/eth: Use bytes as string in key import. Dec 8, 2021
@JoeGruffins
Copy link
Member Author

I ammended the commit and it's not failing now. Here was the test though https://github.com/decred/dcrdex/runs/4453620451?check_suite_focus=true

@chappjc
Copy link
Member

chappjc commented Dec 9, 2021

Can rebase with #1332 merged.
The error you reported is of course #1337, resolved by #1341, as we know now. Thank you for calling that out!

This change is needed because unlocking will use the bytes as a string.

Also set the simnet contract address.
@JoeGruffins
Copy link
Member Author

The error you reported

I was lucky to hit the 1/256

Copy link
Member

@chappjc chappjc left a comment

Choose a reason for hiding this comment

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

In client/asset/driver.go, the definition of CreateWalletParams should probably have a comment to reduce ambiguity like Pass []byte // utf-8, but this PR is good.

@chappjc chappjc merged commit fbff9b6 into decred:master Dec 11, 2021
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

Successfully merging this pull request may close these issues.

3 participants