Fixes + stable gateway ids

This commit is contained in:
Stephan D
2026-02-18 20:38:08 +01:00
parent 4dc182bfa2
commit 770c7b9da9
119 changed files with 3000 additions and 734 deletions

View File

@@ -16,11 +16,11 @@ type ChainAsset struct {
}
type ChainAssetDescription struct {
storable.Storable `bson:",inline" json:",inline"`
Describable `bson:",inline" json:",inline"`
Asset ChainAsset `bson:"asset" json:"asset"`
storable.Base `bson:",inline" json:",inline"`
Describable `bson:",inline" json:",inline"`
Asset ChainAsset `bson:"asset" json:"asset"`
}
func Collection(*ChainAssetDescription) mservice.Type {
func (*ChainAssetDescription) Collection() string {
return mservice.ChainAssets
}

View File

@@ -0,0 +1,21 @@
package model
import (
"testing"
"github.com/tech/sendico/pkg/db/storable"
"github.com/tech/sendico/pkg/mservice"
)
func TestChainAssetDescriptionImplementsStorable(t *testing.T) {
var _ storable.Storable = (*ChainAssetDescription)(nil)
}
func TestChainAssetDescriptionCollection(t *testing.T) {
var desc ChainAssetDescription
want := string(mservice.ChainAssets)
if got := desc.Collection(); got != want {
t.Fatalf("Collection() = %q, want %q", got, want)
}
}