Skip to content
This repository has been archived by the owner on Feb 5, 2023. It is now read-only.

Commit

Permalink
feat: pre sign
Browse files Browse the repository at this point in the history
  • Loading branch information
DIYgod committed Sep 6, 2021
1 parent 9025f67 commit 99dbfed
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"moment": "2.29.1",
"os-browserify": "0.3.0",
"postcss-nested": "5.0.6",
"rss3-next": "0.6.7",
"rss3-next": "0.6.9",
"stream-browserify": "3.0.0",
"stream-http": "3.2.0",
"typescript": "4.3.5",
Expand Down
4 changes: 4 additions & 0 deletions src/common/rss3.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,10 @@ async function metamaskConnect() {
endpoint: config.rss3Endpoint,
address: address,
sign: async (data: string) => await (<Web3>web3).eth.personal.sign(data, address, ''),
callback: async () => {
rss3?.files.set(await rss3.files.get(address));
await rss3?.files.sync();
},
});

return rss3;
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7653,10 +7653,10 @@ rlp@^2.0.0, rlp@^2.2.3, rlp@^2.2.4:
dependencies:
bn.js "^4.11.1"

rss3-next@0.6.7:
version "0.6.7"
resolved "https://registry.yarnpkg.com/rss3-next/-/rss3-next-0.6.7.tgz#5a7212451422ae9163e81dbc9c25aac9ed1d40eb"
integrity sha512-Lp6GoVcLZXM4ZDoZ4tn/aLzw42M5RJzXfgfoez1mTSABIKJNCQRaNYQNcjcXBpTrfs0ZwM7nwFDWo9JvG9dJzw==
rss3-next@0.6.9:
version "0.6.9"
resolved "https://registry.yarnpkg.com/rss3-next/-/rss3-next-0.6.9.tgz#80ebf0431eebca641ec310eec0dbf7209332c737"
integrity sha512-IkgMNRZz+x3k8YAyoVvGV6od8/6pI3JBtOr0ab7+gmHPjQRBwsafVA3GsQrV5E6YkqFccvZp1pmd6+SkupN5ZA==
dependencies:
axios "0.21.1"
ethers "5.4.1"
Expand Down

0 comments on commit 99dbfed

Please sign in to comment.