Skip to content

Commit

Permalink
[web-wallet] Move scripts to js for windows build
Browse files Browse the repository at this point in the history
  • Loading branch information
kent-white authored and aptos-bot committed May 5, 2022
1 parent 23996a1 commit 193b7cf
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
Binary file added ecosystem/web-wallet/build.zip
Binary file not shown.
2 changes: 1 addition & 1 deletion ecosystem/web-wallet/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"prebuild": "rimraf build",
"build": "npm-run-all build:*",
"build:app": "INLINE_RUNTIME_CHUNK=false react-scripts build",
"build:bg": "webpack --mode production ./src/background.ts --output-path ./build --output-filename background.ts",
"build:bg": "webpack --mode production ./src/background.js --output-path ./build --output-filename background.js",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
Expand Down
4 changes: 2 additions & 2 deletions ecosystem/web-wallet/public/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@
"content_scripts": [{
"matches": ["<all_urls>"],
"js": [
"contentscript.ts"
"contentscript.js"
]
}],
"web_accessible_resources": [
"inpage.js"
],
"background": {
"scripts": ["background.ts"],
"scripts": ["background.js"],
"persistent": true
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) Aptos
// SPDX-License-Identifier: Apache-2.0

import { AptosAccount, AptosClient, Types } from 'aptos'
import { AptosClient } from 'aptos'
import { DEVNET_NODE_URL } from './constants'
import { MessageMethod } from './types'
import { getAptosAccountState } from './utils/account'
Expand All @@ -26,15 +26,15 @@ chrome.runtime.onMessage.addListener(function (request, sender, sendResponse) {
return true
})

function getAccountAddress (account: AptosAccount, sendResponse: (response?: any) => void) {
function getAccountAddress (account, sendResponse) {
if (account.address()) {
sendResponse({ address: account.address().hex() })
} else {
sendResponse({ error: 'No accounts signed in' })
}
}

async function signTransaction (account: AptosAccount, transaction: Types.UserTransactionRequest, sendResponse: (response?: any) => void) {
async function signTransaction (account, transaction, sendResponse) {
const client = new AptosClient(DEVNET_NODE_URL)
const message = await client.createSigningMessage(transaction)
const signatureHex = account.signHexString(message.substring(2))
Expand Down
Binary file added ecosystem/web-wallet/wallet.zip
Binary file not shown.

0 comments on commit 193b7cf

Please sign in to comment.