diff --git a/tapdb/assets_store.go b/tapdb/assets_store.go index 400377aff..47f7f9d10 100644 --- a/tapdb/assets_store.go +++ b/tapdb/assets_store.go @@ -1682,7 +1682,7 @@ func (a *AssetStore) LeaseCoins(ctx context.Context, leaseOwner [32]byte, err = q.UpdateUTXOLease(ctx, UpdateUTXOLease{ LeaseOwner: leaseOwner[:], LeaseExpiry: sql.NullTime{ - Time: expiry, + Time: expiry.UTC(), Valid: true, }, Outpoint: outpoint, @@ -1991,7 +1991,7 @@ func insertAssetTransferInput(ctx context.Context, q ActiveAssetsStore, return q.UpdateUTXOLease(ctx, UpdateUTXOLease{ LeaseOwner: finalLeaseOwner[:], LeaseExpiry: sql.NullTime{ - Time: finalLeaseExpiry, + Time: finalLeaseExpiry.UTC(), Valid: true, }, Outpoint: anchorPointBytes, diff --git a/tapdb/assets_store_test.go b/tapdb/assets_store_test.go index c4f60524a..44eb4008d 100644 --- a/tapdb/assets_store_test.go +++ b/tapdb/assets_store_test.go @@ -811,7 +811,7 @@ func TestUTXOLeases(t *testing.T) { // Now we lease the first asset for 1 hour. This will cause the second // one also to be leased, since it's on the same anchor transaction. leaseOwner := fn.ToArray[[32]byte](test.RandBytes(32)) - leaseExpiry := time.Now().Add(time.Hour).UTC() + leaseExpiry := time.Now().Add(time.Hour) err = assetsStore.LeaseCoins( ctx, leaseOwner, leaseExpiry, assetGen.anchorPoints[0], ) @@ -825,7 +825,7 @@ func TestUTXOLeases(t *testing.T) { require.Len(t, selectedAssets, 1) // Let's now update the lease. - leaseExpiry = time.Now().Add(2 * time.Hour).UTC() + leaseExpiry = time.Now().Add(2 * time.Hour) err = assetsStore.LeaseCoins( ctx, leaseOwner, leaseExpiry, assetGen.anchorPoints[0], ) @@ -853,7 +853,7 @@ func TestUTXOLeases(t *testing.T) { // Update the lease again, but into the past, so that it should be // removed upon cleanup. - leaseExpiry = time.Now().Add(-time.Hour).UTC() + leaseExpiry = time.Now().Add(-time.Hour) err = assetsStore.LeaseCoins( ctx, leaseOwner, leaseExpiry, assetGen.anchorPoints[0], )