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

Allow web4bch.bch.personal.sign to sign text messages/strings. #236

Open
modenero opened this issue Feb 29, 2020 · 0 comments
Open

Allow web4bch.bch.personal.sign to sign text messages/strings. #236

modenero opened this issue Feb 29, 2020 · 0 comments

Comments

@modenero
Copy link

What problem are you trying to solve?
I'd like my users to be able to sign BCH messages for an off-chain application. However, after reviewing the code, it appears that the only signature support is for CashID requests.

Describe the solution you'd like
Similar to Ethereum's MetaMask, which uses web3.eth.personal.sign, I'd like to be able to use something similar to web4bch.bch.personal.sign to accomplish the same goal.

Additional context
Currently when attempting to execute the command:

        window.web4bch.bch.sign(
            'hello world',
            window.web4bch.bch.defaultAccount,
            (err, res) => {
                console.log('SIGN ERROR', err)
                console.log('SIGN RESULT', res)
            }
        )

the result is SIGN ERROR Error: Error: WalletMiddleware - Invalid "from" address.

By reversing the order of the parameters to:

        window.web4bch.bch.sign(
            window.web4bch.bch.defaultAccount,
            'hello world',
            (err, res) => {
                console.log('SIGN ERROR', err)
                console.log('SIGN RESULT', res)
            }
        )

Badger will open a signature page, however, the window is NOT rendered correctly, or really at all; making any further action impossible and requiring the plugin to be "manually" reset in the browser.


It's entirely possible that personal.sign has been removed/disabled from the Badger extension. I've also sent an inquiry to badger@bitcoin.com regarding the status of this feature.

Thank you for your time and consideration in this matter...
Cheers!

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