fake labels

This commit is contained in:
Paul Miller
2023-04-30 13:38:05 -05:00
parent 01df1dda24
commit 9d011a5927
3 changed files with 65 additions and 60 deletions

19
src/utils/fakeLabels.ts Normal file
View File

@@ -0,0 +1,19 @@
// Simple storage for fake labels
// For each outpoint string, we can store a boolean whether it's redshifted or not
function setRedshifted(redshifted: boolean, outpoint?: string,) {
if (outpoint === undefined) return;
localStorage.setItem(outpoint, redshifted.toString())
}
function getRedshifted(outpoint: string): boolean {
const redshifted = localStorage.getItem(outpoint)
if (redshifted === null) {
return false
}
return redshifted === 'true'
}
const TEST_UTXO = "47651763fbd74488a478aad80e4205c3e34bbadcfc42b5cd9557ef12a15ab00c:1"
export { setRedshifted, getRedshifted, TEST_UTXO }