diff --git a/handlers/application/pool_deposit.go b/handlers/application/pool_deposit.go index bcc84c1..b540941 100644 --- a/handlers/application/pool_deposit.go +++ b/handlers/application/pool_deposit.go @@ -27,9 +27,9 @@ func (h *MenuHandlers) GetPoolDepositVouchers(ctx context.Context, sym string, i userStore := h.userdataStore // Read stable vouchers from the store - voucherData, err := userStore.ReadEntry(ctx, sessionId, storedb.DATA_STABLE_VOUCHER_SYMBOLS) + voucherData, err := userStore.ReadEntry(ctx, sessionId, storedb.DATA_ORDERED_VOUCHER_SYMBOLS) if err != nil { - logg.ErrorCtxf(ctx, "failed to read stable voucherData entires with", "key", storedb.DATA_STABLE_VOUCHER_SYMBOLS, "error", err) + logg.ErrorCtxf(ctx, "failed to read stable voucherData entires with", "key", storedb.DATA_ORDERED_VOUCHER_SYMBOLS, "error", err) return res, err } @@ -37,9 +37,9 @@ func (h *MenuHandlers) GetPoolDepositVouchers(ctx context.Context, sym string, i return res, nil } - voucherBalances, err := userStore.ReadEntry(ctx, sessionId, storedb.DATA_STABLE_VOUCHER_BALANCES) + voucherBalances, err := userStore.ReadEntry(ctx, sessionId, storedb.DATA_ORDERED_VOUCHER_BALANCES) if err != nil { - logg.ErrorCtxf(ctx, "failed to read stable voucherData entires with", "key", storedb.DATA_STABLE_VOUCHER_BALANCES, "error", err) + logg.ErrorCtxf(ctx, "failed to read stable voucherData entires with", "key", storedb.DATA_ORDERED_VOUCHER_BALANCES, "error", err) return res, err } diff --git a/store/db/db.go b/store/db/db.go index 7260243..e228971 100644 --- a/store/db/db.go +++ b/store/db/db.go @@ -104,14 +104,14 @@ const ( DATA_VOUCHER_DECIMALS // List of voucher EVM addresses for vouchers valid in the user context. DATA_VOUCHER_ADDRESSES - // List of stable voucher symbols in the user context. - DATA_STABLE_VOUCHER_SYMBOLS - // List of stable voucher decimal counts for vouchers valid in the user context. - DATA_STABLE_VOUCHER_BALANCES - // List of stable voucher decimal counts for vouchers valid in the user context. - DATA_STABLE_VOUCHER_DECIMALS - // List of stable voucher EVM addresses for vouchers valid in the user context. - DATA_STABLE_VOUCHER_ADDRESSES + // List of ordered voucher symbols in the user context. + DATA_ORDERED_VOUCHER_SYMBOLS + // List of ordered voucher balances in the user context. + DATA_ORDERED_VOUCHER_BALANCES + // List of ordered voucher decimals in the user context. + DATA_ORDERED_VOUCHER_DECIMALS + // List of ordered voucher EVM addresses in the user context. + DATA_ORDERED_VOUCHER_ADDRESSES ) const ( diff --git a/store/vouchers.go b/store/vouchers.go index 5c28a0f..c8d5e42 100644 --- a/store/vouchers.go +++ b/store/vouchers.go @@ -123,10 +123,10 @@ func GetVoucherData(ctx context.Context, store DataStore, sessionId string, inpu // GetStableVoucherData retrieves and matches stable voucher data func GetStableVoucherData(ctx context.Context, store DataStore, sessionId string, input string) (*dataserviceapi.TokenHoldings, error) { keys := []storedb.DataTyp{ - storedb.DATA_STABLE_VOUCHER_SYMBOLS, - storedb.DATA_STABLE_VOUCHER_BALANCES, - storedb.DATA_STABLE_VOUCHER_DECIMALS, - storedb.DATA_STABLE_VOUCHER_ADDRESSES, + storedb.DATA_ORDERED_VOUCHER_SYMBOLS, + storedb.DATA_ORDERED_VOUCHER_BALANCES, + storedb.DATA_ORDERED_VOUCHER_DECIMALS, + storedb.DATA_ORDERED_VOUCHER_ADDRESSES, } data := make(map[storedb.DataTyp]string) @@ -139,10 +139,10 @@ func GetStableVoucherData(ctx context.Context, store DataStore, sessionId string } symbol, balance, decimal, address := MatchVoucher(input, - data[storedb.DATA_STABLE_VOUCHER_SYMBOLS], - data[storedb.DATA_STABLE_VOUCHER_BALANCES], - data[storedb.DATA_STABLE_VOUCHER_DECIMALS], - data[storedb.DATA_STABLE_VOUCHER_ADDRESSES], + data[storedb.DATA_ORDERED_VOUCHER_SYMBOLS], + data[storedb.DATA_ORDERED_VOUCHER_BALANCES], + data[storedb.DATA_ORDERED_VOUCHER_DECIMALS], + data[storedb.DATA_ORDERED_VOUCHER_ADDRESSES], ) if symbol == "" {