Created
May 10, 2022 20:31
-
-
Save protozoo/e5e51694ecbd7aceea7d6c77dd38e15f to your computer and use it in GitHub Desktop.
Log FxHash Tokens as backup / time-capsule
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function logFxHashToken(){ | |
let pastTokens = localStorage.getItem("fxhash_tokens"); | |
if( pastTokens ){ | |
pastTokens = JSON.parse( pastTokens ); | |
}else{ | |
pastTokens = []; | |
} | |
let newToken = { token:fxhash, date:new Date() } ; | |
pastTokens.unshift( newToken ); | |
localStorage.setItem( "fxhash_tokens", JSON.stringify( pastTokens ) ); | |
} | |
logFxHashToken() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment