diff --git a/.github/workflows/github-pages.yml b/.github/workflows/github-pages.yml index dbc51a4..11287fc 100644 --- a/.github/workflows/github-pages.yml +++ b/.github/workflows/github-pages.yml @@ -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') }} diff --git a/src/eth/eth-wrapper.js b/src/eth/eth-wrapper.js index 9f5f1eb..f11f472 100644 --- a/src/eth/eth-wrapper.js +++ b/src/eth/eth-wrapper.js @@ -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 @@ -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)