Skip to content

Commit

Permalink
[web-wallet] Remove extra text
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 1a0bd3c commit bb7ee59
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion ecosystem/web-wallet/public/contentscript.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ window.addEventListener('message', function (event) {
// contentscript -> background
chrome.runtime.sendMessage(event.data, function (response) {
// contentscript -> inpage
window.postMessage( { responseMethod: event.data.method, id: event.data.id, response })
window.postMessage({ responseMethod: event.data.method, id: event.data.id, response })
})
}
})
18 changes: 9 additions & 9 deletions ecosystem/web-wallet/public/inpage.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
// SPDX-License-Identifier: Apache-2.0

class Web3 {
requestId;
requestId

constructor() {
constructor () {
this.requestId = 0
}

Expand All @@ -14,10 +14,10 @@ class Web3 {
const method = 'getAccountAddress'
window.postMessage({ method, id })
window.addEventListener('message', function handler (event) {
if (event.data.responseMethod === method
&& event.data.id === id ) {
if (event.data.responseMethod === method &&
event.data.id === id) {
const response = event.data.response
this.removeEventListener('message', handler);
this.removeEventListener('message', handler)
if (response.address) {
resolve(response.address)
} else {
Expand All @@ -32,12 +32,12 @@ class Web3 {
const id = this.requestId++
return new Promise(function (resolve, reject) {
const method = 'signTransaction'
window.postMessage({ method, transaction, id})
window.postMessage({ method, transaction, id })
window.addEventListener('message', function handler (event) {
if (event.data.responseMethod === method
&& event.data.id === id ) {
if (event.data.responseMethod === method &&
event.data.id === id) {
const response = event.data.response
this.removeEventListener('message', handler);
this.removeEventListener('message', handler)
if (response.transaction) {
resolve(response.transaction)
} else {
Expand Down
2 changes: 1 addition & 1 deletion ecosystem/web-wallet/src/pages/Login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ function Login () {
</Box>
</Center>
<Heading textAlign="center">Wallet</Heading>
<Text textAlign="center" pb={8} color={secondaryTextColor[colorMode]}>The official Aptos crypto wallet</Text>
<Text textAlign="center" pb={8} color={secondaryTextColor[colorMode]}>An Aptos crypto wallet</Text>
<form onSubmit={handleSubmit(onSubmit)}>
<VStack spacing={4}>
<Center minW="100%" px={4}>
Expand Down

0 comments on commit bb7ee59

Please sign in to comment.