mirror of
https://github.com/aljazceru/nutshell.git
synced 2025-12-24 03:54:21 +01:00
Wallet/fix_nostr_timeout (#376)
* fix nostr receive * split with amount pre 0.13 * drop 0.13.0 amount with split compatibility
This commit is contained in:
@@ -107,16 +107,13 @@ def deserialize_token_from_string(token: str) -> TokenV3:
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
# ----- receive token -----
|
||||
if token.startswith("cashu"):
|
||||
tokenObj = TokenV3.deserialize(token)
|
||||
assert len(tokenObj.token), Exception("no proofs in token")
|
||||
assert len(tokenObj.token[0].proofs), Exception("no proofs in token")
|
||||
return tokenObj
|
||||
|
||||
# deserialize token
|
||||
# dtoken = json.loads(base64.urlsafe_b64decode(token))
|
||||
tokenObj = TokenV3.deserialize(token)
|
||||
|
||||
# tokenObj = TokenV2.parse_obj(dtoken)
|
||||
assert len(tokenObj.token), Exception("no proofs in token")
|
||||
assert len(tokenObj.token[0].proofs), Exception("no proofs in token")
|
||||
return tokenObj
|
||||
raise Exception("Invalid token")
|
||||
|
||||
|
||||
async def receive(
|
||||
|
||||
Reference in New Issue
Block a user