harmony-one / chrome-extension-wallet

Harmony Chrome Extension Wallet
https://chrome.google.com/webstore/detail/harmony-one-wallet/fnnegphlobjdpkhecapkijjdkgcjhkib
60 stars 36 forks source link

Audit logs, stricter signing, and fetch rpc gasPrice #124

Open hashmesan opened 2 years ago

hashmesan commented 2 years ago

Changes in this PR (1.2.7)

Audit Logs

Audit logs are event logging stored in chrome.storage (higher storage limits than localStorage). It stores all the internalEvents, externalEvents, as well as any decrypt fails, successful send one, send token, stake, sign transaction.

Logs can be downloaded from settings menu as JSON.

image

Strict Signing

Misc

hashmesan commented 2 years ago

BUILD: onewallet.zip

Checksums

f154b1cb14edddb503f0eb206fc02619  dist/background.js
a977b17761041948fbf5fb078e3516d5  dist/content-script.js
56b83367de1bad67f158c51ac140006a  dist/inject-script.js
65279d2f01367823f85977f02fd36293  dist/popup.js
604c6d74953a59aedc1af4c4f0b94e16  dist/popup.html
polymorpher commented 2 years ago

The change looks good. Reviewing all code from scratch and testing

polymorpher commented 2 years ago

Code looks good (checked independent of the diffs)

polymorpher commented 2 years ago

Hash confirmed. Transfer and Delegate operations are tested. Signing (smart contract call), personal sign (offline), undelegate, and collectreward are not tested yet

9dd83b1e280ac286a73d1dd77d1a630e  onewallet.zip

f154b1cb14edddb503f0eb206fc02619  onewallet/background.js
a977b17761041948fbf5fb078e3516d5  onewallet/content-script.js
56b83367de1bad67f158c51ac140006a  onewallet/inject-script.js
b848e51f945486bc2ed9c6d132be76fa  onewallet/popup.js
604c6d74953a59aedc1af4c4f0b94e16  onewallet/popup.html
hashmesan commented 2 years ago

@polymorpher

New checksum is

f154b1cb14edddb503f0eb206fc02619  dist/background.js
a977b17761041948fbf5fb078e3516d5  dist/content-script.js
56b83367de1bad67f158c51ac140006a  dist/inject-script.js
65279d2f01367823f85977f02fd36293  dist/popup.js
604c6d74953a59aedc1af4c4f0b94e16  dist/popup.html
polymorpher commented 2 years ago

New changes look good. Also I got hashes

f154b1cb14edddb503f0eb206fc02619  onewallet/background.js
a977b17761041948fbf5fb078e3516d5  onewallet/content-script.js
56b83367de1bad67f158c51ac140006a  onewallet/inject-script.js
ce8793e5caccd76ef073947346e533ca  onewallet/popup.js
604c6d74953a59aedc1af4c4f0b94e16  onewallet/popup.html
hashmesan commented 2 years ago

It was cached. I added echo to break it..

FROM node:14

WORKDIR /usr/src/app
RUN echo 1 # increment this
RUN git clone https://github.com/harmony-one/chrome-extension-wallet.git
WORKDIR /usr/src/app/chrome-extension-wallet
RUN git fetch origin pull/124/head
RUN npm install
RUN npm run build

It matches now:

f154b1cb14edddb503f0eb206fc02619  dist/background.js
a977b17761041948fbf5fb078e3516d5  dist/content-script.js
56b83367de1bad67f158c51ac140006a  dist/inject-script.js
ce8793e5caccd76ef073947346e533ca  dist/popup.js
604c6d74953a59aedc1af4c4f0b94e16  dist/popup.html
hashmesan commented 2 years ago

@polymorpher Previous build didn't checkout PR.

This is the correct Dockerfile

FROM node:14

WORKDIR /usr/src/app
RUN git clone https://github.com/harmony-one/chrome-extension-wallet.git
WORKDIR /usr/src/app/chrome-extension-wallet
RUN git fetch origin pull/124/head && git checkout FETCH_HEAD
RUN git log -3
RUN npm install
RUN npm run build

and build without cache

docker build -t chrome-build --no-cache .

polymorpher commented 2 years ago

okay, hashes are

27271cad9dc90f25a7f2eab2861eab2b  onewallet/background.js
156770284f99f8e9019a15f7419c34f5  onewallet/content-script.js
c163f7329920e2e512dcfc3e63410711  onewallet/inject-script.js
6fe27b144e95dfd5110067afde96ed54  onewallet/popup.js
604c6d74953a59aedc1af4c4f0b94e16  onewallet/popup.html
polymorpher commented 2 years ago

I think this is ready for a release

hashmesan commented 2 years ago

Signatures match -- all go for release.

012cf6a10129e2275d79d6adac7f3b02  ./fonts/MaterialIcons-Regular.woff
1484aa61aca6d60d7818332e5b8664c6  ./images/harmony-big.png
156770284f99f8e9019a15f7419c34f5  ./content-script.js   YES
27271cad9dc90f25a7f2eab2861eab2b  ./background.js YES
2b470564821c19dc383cf82898a868e4  ./images/ethereum.svg
4528eed8118cc703671f71957fd87c4d  ./images/checkbox_on@2x.png
4d0322f2fda4a30ee3a898757c47977f  ./icons/48.ico
570eb83859dc23dd0eec423a49e147fe  ./fonts/MaterialIcons-Regular.woff2
604c6d74953a59aedc1af4c4f0b94e16  ./popup.html
68913d3bc039d80bd467980faa9d51d3  ./icons/32.ico
6fe27b144e95dfd5110067afde96ed54  ./popup.js YEES
874b4b4ebaec45c6c0e05387e9f6d691  ./icons/128.ico
8e32989352f3d547ebc63d3510b55f0a  ./images/ledger.svg
8ed9856b3f59fcf36200322dc557deef  ./images/NFT_Icon.png
9016d84af20bc6da450d59f12aea1312  ./images/checkbox_off@2x.png
a022c272f8a0684cb05231175d5e7801  ./images/logo-blue.png
a37b0c01c0baf1888ca812cc0508f6e2  ./fonts/MaterialIcons-Regular.ttf
aee863680e754c3dca89e3b36a51aec1  ./images/harmony.png
c163f7329920e2e512dcfc3e63410711  ./inject-script.js YES
d41d8cd98f00b204e9800998ecf8427e  ./checksums.md5
d46d16a8c8e007d131c9723b385f9fff  ./images/harmony-small.png
e79bfd88537def476913f3ed52f4f4b3  ./fonts/MaterialIcons-Regular.eot
f49efa127672ce747c4420b7e82722ad  ./manifest.json
facc320e952f28067026f857a6a87862  ./icons/16.ico
polymorpher commented 2 years ago

merge this? since it is already deployed

hashmesan commented 2 years ago

Updated build. All the scripts checksums are the same. The only file changed is the manifest.json. onewallet.zip

polymorpher commented 2 years ago
27271cad9dc90f25a7f2eab2861eab2b  onewallet/background.js
156770284f99f8e9019a15f7419c34f5  onewallet/content-script.js
c163f7329920e2e512dcfc3e63410711  onewallet/inject-script.js
d4a7f353b15d476b897c16a138cf877e  onewallet/popup.js
604c6d74953a59aedc1af4c4f0b94e16  onewallet/popup.html
polymorpher commented 2 years ago

I also changed version to 1.2.8

hashmesan commented 2 years ago

New build for modaljs fix

onewallet.zip

83c6ac4975b001cb2912c50515f600e9  ./inject-script.js
9750b2210ecf5a2742b08f91f89da993  ./background.js
b97a025a8fe2532f9f9fa638c5756992  ./popup.js
c0684567a05868201c4bd8290b75da5f  ./manifest.json
f867f05b8c8ea89abe5b0eea2f87ac5b  ./content-script.js
polymorpher commented 2 years ago

I built with termsModal set to width: "100%", height: "600px”

9750b2210ecf5a2742b08f91f89da993  onewallet/background.js
f867f05b8c8ea89abe5b0eea2f87ac5b  onewallet/content-script.js
83c6ac4975b001cb2912c50515f600e9  onewallet/inject-script.js
b97a025a8fe2532f9f9fa638c5756992  onewallet/popup.js
604c6d74953a59aedc1af4c4f0b94e16  onewallet/popup.html
c0684567a05868201c4bd8290b75da5f  onewallet/manifest.json