Set active / default voucher on first tx

This commit is contained in:
lash 2024-11-02 23:43:19 +00:00
parent 98c65bc1b1
commit e0a3410f36
Signed by: lash
GPG Key ID: 21D2E7BB88C2A746
3 changed files with 10 additions and 13 deletions

View File

@ -95,8 +95,14 @@ func updateTokenList(ctx context.Context, api remote.AccountServiceInterface, st
// return nil
//}
//
func updateDefaultToken(ctx context.Context, store *common.UserDataStore, identity lookup.Identity, activeSym string) error {
return nil
pfxDb := common.StoreToPrefixDb(store, []byte("vouchers"))
tokenData, err := common.GetVoucherData(ctx, pfxDb, activeSym)
if err != nil {
return err
}
return common.UpdateVoucherData(ctx, store, identity.SessionId, tokenData)
}
func updateWait(ctx context.Context, api remote.AccountServiceInterface) error {
@ -124,15 +130,6 @@ func updateToken(ctx context.Context, store *common.UserDataStore, identity look
return err
}
// err = updateTokenBalance(ctx, &api, store, sessionId)
// if err != nil {
// return err
// }
// err = updateTokenTransferList(ctx, &api, store, sessionId)
// if err != nil {
// return err
// }
//
return nil
}

2
go.mod
View File

@ -4,7 +4,7 @@ go 1.23.2
require (
git.defalsify.org/vise.git v0.2.1-0.20241031204035-b588301738ed
git.grassecon.net/urdt/ussd v0.0.0-20241102164250-3a8a5f40baa5
git.grassecon.net/urdt/ussd v0.0.0-20241102234108-dae12ac4989e
github.com/grassrootseconomics/eth-tracker v1.3.0-rc
github.com/nats-io/nats.go v1.37.0
)

4
go.sum
View File

@ -1,7 +1,7 @@
git.defalsify.org/vise.git v0.2.1-0.20241031204035-b588301738ed h1:4TrsfbK7NKgsa7KjMPlnV/tjYTkAAXP5PWAZzUfzCdI=
git.defalsify.org/vise.git v0.2.1-0.20241031204035-b588301738ed/go.mod h1:jyBMe1qTYUz3mmuoC9JQ/TvFeW0vTanCUcPu3H8p4Ck=
git.grassecon.net/urdt/ussd v0.0.0-20241102164250-3a8a5f40baa5 h1:B+2YYPw8REXOuEL0PgS5Mzky253wrwWYL9mpD5CmGW4=
git.grassecon.net/urdt/ussd v0.0.0-20241102164250-3a8a5f40baa5/go.mod h1:ADB/wpwvI6umvYzGqpJGm/GYj8msxYGiczzWCCdXegs=
git.grassecon.net/urdt/ussd v0.0.0-20241102234108-dae12ac4989e h1:YOEAjTrlyDRm0E63fEq8HbMp7oUCyc3vbAPOIw0xNWA=
git.grassecon.net/urdt/ussd v0.0.0-20241102234108-dae12ac4989e/go.mod h1:ADB/wpwvI6umvYzGqpJGm/GYj8msxYGiczzWCCdXegs=
github.com/alecthomas/assert/v2 v2.2.2 h1:Z/iVC0xZfWTaFNE6bA3z07T86hd45Xe2eLt6WVy2bbk=
github.com/alecthomas/assert/v2 v2.2.2/go.mod h1:pXcQ2Asjp247dahGEmsZ6ru0UVwnkhktn7S0bBDLxvQ=
github.com/alecthomas/repr v0.2.0 h1:HAzS41CIzNW5syS8Mf9UwXhNH1J9aix/BvDRf1Ml2Yk=