forked from cerc-io/ipld-eth-server
update bite to take in string for urn and ilk
This commit is contained in:
@@ -79,8 +79,8 @@ var _ = Describe("Bite Converter", func() {
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
expectedModel := bite.BiteModel{
|
||||
Id: "1",
|
||||
Ilk: []byte{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
|
||||
Urn: []byte{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
|
||||
Ilk: "",
|
||||
Urn: "",
|
||||
Ink: "",
|
||||
Art: "",
|
||||
IArt: "",
|
||||
|
||||
@@ -21,8 +21,8 @@ import (
|
||||
|
||||
type BiteEntity struct {
|
||||
Id *big.Int
|
||||
Ilk [32]byte
|
||||
Urn [32]byte
|
||||
Ilk string
|
||||
Urn string
|
||||
Ink *big.Int
|
||||
Art *big.Int
|
||||
Tab *big.Int
|
||||
|
||||
@@ -16,8 +16,8 @@ package bite
|
||||
|
||||
type BiteModel struct {
|
||||
Id string
|
||||
Ilk []byte
|
||||
Urn []byte
|
||||
Ilk string
|
||||
Urn string
|
||||
Ink string
|
||||
Art string
|
||||
IArt string
|
||||
|
||||
@@ -40,8 +40,8 @@ var (
|
||||
biteIArt = big.NewInt(5)
|
||||
biteRawJson, _ = json.Marshal(EthBiteLog)
|
||||
biteRawString = string(biteRawJson)
|
||||
biteIlk = [32]byte{102, 97, 107, 101, 32, 105, 108, 107, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
|
||||
biteLad = [32]byte{102, 97, 107, 101, 32, 108, 97, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
|
||||
biteIlk = "ilk"
|
||||
biteLad = "urn"
|
||||
biteId = int64(1)
|
||||
)
|
||||
|
||||
@@ -76,8 +76,8 @@ var BiteEntity = bite.BiteEntity{
|
||||
|
||||
var BiteModel = bite.BiteModel{
|
||||
Id: strconv.FormatInt(biteId, 10),
|
||||
Ilk: biteIlk[:],
|
||||
Urn: biteLad[:],
|
||||
Ilk: biteIlk,
|
||||
Urn: biteLad,
|
||||
Ink: biteInk.String(),
|
||||
Art: biteArt.String(),
|
||||
Tab: biteTab.String(),
|
||||
|
||||
Reference in New Issue
Block a user