add check for account when doing a pool deposit
This commit is contained in:
parent
ba8d2a19c2
commit
d4f27af7a7
@ -432,6 +432,11 @@ func (das *DevAccountService) CreateAccount(ctx context.Context) (*models.Accoun
|
||||
}
|
||||
|
||||
func (das *DevAccountService) PoolDeposit(ctx context.Context, amount, from, poolAddress, tokenAddress string) (*models.PoolDepositResult, error) {
|
||||
_, ok := das.accounts[from]
|
||||
if !ok {
|
||||
return nil, fmt.Errorf("account not found (publickey): %v", from)
|
||||
}
|
||||
|
||||
sym, ok := das.vouchersAddress[tokenAddress]
|
||||
if !ok {
|
||||
return nil, fmt.Errorf("voucher address %v not found", tokenAddress)
|
||||
|
Loading…
Reference in New Issue
Block a user