Skip to content

Commit 7e8dfc1

Browse files
committed
Update lease module
1 parent 8d7bf67 commit 7e8dfc1

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/sentinel_sdk/modules/lease.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,15 @@ def __init__(self, channel: grpc.Channel, account, provider_account, client):
2020
self._provider_account = provider_account
2121

2222
def EndLease(self, subscription_id: int, tx_params: TxParams = TxParams()):
23-
msg = msg_pb2.MsgSubscribeRequest(
23+
msg = msg_pb2.MsgEndLeaseRequest(
2424
frm = self._account.address,
2525
id = subscription_id,
2626
)
2727

2828
return self.transaction([msg], tx_params)
2929

3030
def RenewLease(self, subscription_id: int, hours: int, max_price: Price = Price(), tx_params: TxParams = TxParams()):
31-
msg = msg_pb2.MsgSubscribeRequest(
31+
msg = msg_pb2.MsgRenewLeaseRequest(
3232
frm = self._account.address,
3333
id = subscription_id,
3434
hours = hours,
@@ -38,7 +38,7 @@ def RenewLease(self, subscription_id: int, hours: int, max_price: Price = Price(
3838
return self.transaction([msg], tx_params)
3939

4040
def StartLease(self, node: str, hours: int, max_price: Price = Price(), renewal: int = RenewalPricePolicy.RENEWAL_PRICE_POLICY_IF_LESSER_OR_EQUAL, tx_params: TxParams = TxParams()):
41-
msg = msg_pb2.MsgSubscribeRequest(
41+
msg = msg_pb2.MsgStartLeaseRequest(
4242
frm = self._account.address,
4343
node_address = node,
4444
hours = hours,
@@ -49,7 +49,7 @@ def StartLease(self, node: str, hours: int, max_price: Price = Price(), renewal:
4949
return self.transaction([msg], tx_params)
5050

5151
def UpdateLease(self, subscription_id: int, renewal: int = RenewalPricePolicy.RENEWAL_PRICE_POLICY_IF_LESSER_OR_EQUAL, tx_params: TxParams = TxParams()):
52-
msg = msg_pb2.MsgSubscribeRequest(
52+
msg = msg_pb2.MsgUpdateLeaseRequest(
5353
frm = self._account.address,
5454
id = subscription_id,
5555
renewal_price_policy = renewal,

0 commit comments

Comments
 (0)