feat: `GetDerivedAddressForPath` endpoint added
This commit is contained in:
parent
d4ec412df2
commit
d44fa42cbf
|
@ -399,6 +399,15 @@ func (api *API) GetSuggestedRoutes(
|
||||||
return api.router.suggestedRoutes(ctx, sendType, account, amountIn.ToInt(), tokenSymbol, disabledFromChainIDs, disabledToChaindIDs, preferedChainIDs, gasFeeMode, fromLockedAmount)
|
return api.router.suggestedRoutes(ctx, sendType, account, amountIn.ToInt(), tokenSymbol, disabledFromChainIDs, disabledToChaindIDs, preferedChainIDs, gasFeeMode, fromLockedAmount)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (api *API) GetDerivedAddressForPath(ctx context.Context, password string, derivedFrom string, path string) (*DerivedAddress, error) {
|
||||||
|
info, err := api.s.gethManager.AccountsGenerator().LoadAccount(derivedFrom, password)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
return api.getDerivedAddress(info.ID, path)
|
||||||
|
}
|
||||||
|
|
||||||
func (api *API) GetDerivedAddressesForPath(ctx context.Context, password string, derivedFrom string, path string, pageSize int, pageNumber int) ([]*DerivedAddress, error) {
|
func (api *API) GetDerivedAddressesForPath(ctx context.Context, password string, derivedFrom string, path string, pageSize int, pageNumber int) ([]*DerivedAddress, error) {
|
||||||
info, err := api.s.gethManager.AccountsGenerator().LoadAccount(derivedFrom, password)
|
info, err := api.s.gethManager.AccountsGenerator().LoadAccount(derivedFrom, password)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in New Issue