Skip to content

Instantly share code, notes, and snippets.

@protozoo
Created May 10, 2022 20:31
Show Gist options
  • Save protozoo/e5e51694ecbd7aceea7d6c77dd38e15f to your computer and use it in GitHub Desktop.
Save protozoo/e5e51694ecbd7aceea7d6c77dd38e15f to your computer and use it in GitHub Desktop.
Log FxHash Tokens as backup / time-capsule
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