Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Ethereum
Skin Z
Commits
ac564630
Commit
ac564630
authored
Sep 09, 2021
by
Kegan
Browse files
removed unlinking feature as it was unnecessary
parent
52437255
Changes
1
Hide whitespace changes
Inline
Side-by-side
contracts/SteamToEtherSafe.sol
View file @
ac564630
...
...
@@ -7,7 +7,7 @@ import "@openzeppelin/contracts/utils/Address.sol";
// this is a way to store steam/eth wallet links without exposing what wallet is linked to what steam account
contract
SteamToEtherSafe
is
Context
{
contract
SteamToEtherSafe
is
Context
{
using
Address
for
address
;
mapping
(
uint256
=>
uint256
)
internal
_links
;
...
...
@@ -45,14 +45,8 @@ contract SteamToEtherSafe is Context{
// what do we do if someone loses their account? forever broken steamid64 link?
function
LinkAccount
(
uint256
hashed_steamid
)
public
{
uint256
_wallet
=
uint256
(
keccak256
(
abi
.
encodePacked
(
_msgSender
())));
require
(
_links
[
_wallet
]
==
0
,
"Account already linked, must unlink from the source wallet"
);
//prevent hackers/others from taking over an accuont link
_links
[
_wallet
]
=
hashed_steamid
;
}
function
UnlinkAccount
()
public
{
uint256
_wallet
=
uint256
(
keccak256
(
abi
.
encodePacked
(
_msgSender
())));
_links
[
_wallet
]
=
0
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment