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

update #6

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/workflows/github-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,18 @@ on:

jobs:
gh-pages:
runs-on: ubuntu-18.04
runs-on: ubuntu-latest
steps:
- name: Check out
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Setup Node
uses: actions/setup-node@v1
uses: actions/setup-node@v3
with:
node-version: '12.x'
node-version: '18.x'

- name: Cache dependencies
uses: actions/cache@v1
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
Expand Down
5 changes: 4 additions & 1 deletion src/eth/eth-wrapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
// Updated by EIP-1193 (ethereum.request)
// https://eips.ethereum.org/EIPS/eip-1193

import { encodeBase16 } from "../lib"

// Ethereum object injected by Metamask
const eth_ = window.ethereum

Expand Down Expand Up @@ -34,7 +36,8 @@ export const ethereumAddress = async () => {
// https://github.com/ethereum/go-ethereum/wiki/Management-APIs#personal_sign
export const ethereumSign = async (bytes, ethAddr) => {
// Create args, fix arrays/buffers
const args = { params: [[...bytes], ethAddr] }
const msg = encodeBase16(bytes)
const args = { params: [msg, ethAddr] }

// Returns signature in hex format
return await ethRequest('personal_sign', args)
Expand Down