coins: Fix Firo seedid

This commit is contained in:
tecnovert
2022-11-08 16:43:28 +02:00
parent ca264db0d0
commit c440f9e3a3
5 changed files with 40 additions and 3 deletions

View File

@@ -727,7 +727,7 @@ class BasicSwap(BaseApp):
return
root_key = self.getWalletKey(coin_type, 1)
root_hash = ci.getAddressHashFromKey(root_key)[::-1]
root_hash = ci.getSeedHash(root_key)
try:
ci.initialiseWallet(root_key)

View File

@@ -371,6 +371,9 @@ class BTCInterface(CoinInterface):
pk = self.getPubkey(key)
return hash160(pk)
def getSeedHash(self, seed):
return self.getAddressHashFromKey(seed)[::-1]
def verifyKey(self, k):
i = b2i(k)
return (i < ep.o and i > 0)

View File

@@ -156,6 +156,9 @@ class FIROInterface(BTCInterface):
return CScript([OP_HASH160, script_hash_hash, OP_EQUAL])
def getSeedHash(self, seed):
return hash160(seed)[::-1]
def encodeScriptDest(self, script):
# Extract hash from script
script_hash = script[2:-1]