-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
OCT-517: feat: add endpoint for effective-deposit
- Loading branch information
1 parent
a1e493a
commit 7065a98
Showing
4 changed files
with
48 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
from typing import List | ||
|
||
from app import database | ||
from app.core.common import UserDeposit | ||
from app.exceptions import EffectiveDepositNotFound | ||
|
||
|
||
def get_by_user_and_epoch( | ||
user_address: str, epoch: int | ||
) -> UserDeposit: | ||
deposit = database.deposits.get_by_user_address_and_epoch(user_address, epoch) | ||
if deposit is None: | ||
raise EffectiveDepositNotFound(user_address, epoch) | ||
return deposit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters