feat: prepare for merchant active/restoring state
This commit is contained in:
parent
16e15939d3
commit
b89d761b04
5 changed files with 63 additions and 7 deletions
|
|
@ -42,7 +42,8 @@ class MerchantProfile(BaseModel):
|
|||
class MerchantConfig(MerchantProfile):
|
||||
event_id: Optional[str]
|
||||
sync_from_nostr = False
|
||||
|
||||
active: bool = False
|
||||
restore_in_progress: Optional[bool] = False
|
||||
|
||||
class PartialMerchant(BaseModel):
|
||||
private_key: str
|
||||
|
|
@ -52,6 +53,7 @@ class PartialMerchant(BaseModel):
|
|||
|
||||
class Merchant(PartialMerchant, Nostrable):
|
||||
id: str
|
||||
time: Optional[int]
|
||||
|
||||
def sign_hash(self, hash: bytes) -> str:
|
||||
return sign_message_hash(self.private_key, hash)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue