Skip to content

Commit

Permalink
fix signer test due to mtg sdk upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
cedricfung committed Aug 12, 2024
1 parent 4add801 commit 1b400a6
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 31 deletions.
6 changes: 3 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ require (
github.com/MixinNetwork/bot-api-go-client/v3 v3.7.4
github.com/MixinNetwork/mixin v0.18.12
github.com/MixinNetwork/multi-party-sig v0.4.1
github.com/MixinNetwork/trusted-group v0.8.3-0.20240811152936-c76164b467d1
github.com/MixinNetwork/trusted-group v0.8.3-0.20240812060927-21645e7e9ff7
github.com/btcsuite/btcd v0.24.2
github.com/btcsuite/btcd/btcec/v2 v2.3.4
github.com/btcsuite/btcd/btcutil v1.1.5
Expand All @@ -17,13 +17,13 @@ require (
github.com/ethereum/go-ethereum v1.14.7
github.com/fox-one/mixin-sdk-go/v2 v2.0.8
github.com/fxamacker/cbor/v2 v2.7.0
github.com/gofrs/uuid/v5 v5.2.0
github.com/gofrs/uuid/v5 v5.3.0
github.com/mattn/go-sqlite3 v1.14.22
github.com/mdp/qrterminal v1.0.1
github.com/pelletier/go-toml v1.9.5
github.com/shopspring/decimal v1.4.0
github.com/stretchr/testify v1.9.0
github.com/urfave/cli/v2 v2.27.3
github.com/urfave/cli/v2 v2.27.4
golang.org/x/crypto v0.26.0
)

Expand Down
12 changes: 6 additions & 6 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ github.com/MixinNetwork/mixin v0.18.12 h1:hMHaZUe9k65C7goDrKAlOHlMJHDvB1wTf9QxQE
github.com/MixinNetwork/mixin v0.18.12/go.mod h1:46byqFCaEelxJKspfEcJ5gEYTdE4FabPMV57DfiYDU8=
github.com/MixinNetwork/multi-party-sig v0.4.1 h1:rQdIVSDQQOUMub8ERDV1gbFHxGSD5/+Ve7gj5hGHiPs=
github.com/MixinNetwork/multi-party-sig v0.4.1/go.mod h1:mnZyPutnRV2+E6z3v5TpTb7q4HnS7IplS0yy4dPjVGA=
github.com/MixinNetwork/trusted-group v0.8.3-0.20240811152936-c76164b467d1 h1:DeTvthK5+kMzGGvGH3ZIFYZVNbVNgqyvONev25ROPxg=
github.com/MixinNetwork/trusted-group v0.8.3-0.20240811152936-c76164b467d1/go.mod h1:z/QKUbHQdemNrmUdr5rVlCILdCePpWCHKAaEluBQ5W0=
github.com/MixinNetwork/trusted-group v0.8.3-0.20240812060927-21645e7e9ff7 h1:1C8WYgG4IidLl+GWwIFhV4SeDwbNLyYK6d2cYcUJPUk=
github.com/MixinNetwork/trusted-group v0.8.3-0.20240812060927-21645e7e9ff7/go.mod h1:z/QKUbHQdemNrmUdr5rVlCILdCePpWCHKAaEluBQ5W0=
github.com/StackExchange/wmi v1.2.1/go.mod h1:rcmrprowKIVzvc+NUiLncP2uuArMWLCbu9SBzvHz7e8=
github.com/aead/siphash v1.0.1 h1:FwHfE/T45KPKYuuSAKyyvE+oPWcaQ+CUmFW0bPlM+kg=
github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII=
Expand Down Expand Up @@ -103,8 +103,8 @@ github.com/go-resty/resty/v2 v2.14.0 h1:/rhkzsAqGQkozwfKS5aFAbb6TyKd3zyFRWcdRXLP
github.com/go-resty/resty/v2 v2.14.0/go.mod h1:IW6mekUOsElt9C7oWr0XRt9BNSD6D5rr9mhk6NjmNHg=
github.com/gofrs/uuid v4.4.0+incompatible h1:3qXRTX8/NbyulANqlc0lchS1gqAVxRgsuW1YrTJupqA=
github.com/gofrs/uuid v4.4.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM=
github.com/gofrs/uuid/v5 v5.2.0 h1:qw1GMx6/y8vhVsx626ImfKMuS5CvJmhIKKtuyvfajMM=
github.com/gofrs/uuid/v5 v5.2.0/go.mod h1:CDOjlDMVAtN56jqyRUZh58JT31Tiw7/oQyEXZV+9bD8=
github.com/gofrs/uuid/v5 v5.3.0 h1:m0mUMr+oVYUdxpMLgSYCZiXe7PuVPnI94+OMeVBNedk=
github.com/gofrs/uuid/v5 v5.3.0/go.mod h1:CDOjlDMVAtN56jqyRUZh58JT31Tiw7/oQyEXZV+9bD8=
github.com/golang-jwt/jwt v3.2.2+incompatible h1:IfV12K8xAKAnZqdXVzCZ+TOjboZ2keLg81eXfW3O+oY=
github.com/golang-jwt/jwt v3.2.2+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I=
github.com/golang-jwt/jwt/v5 v5.2.1 h1:OuVbFODueb089Lh128TAcimifWaLhJwVflnrgM17wHk=
Expand Down Expand Up @@ -210,8 +210,8 @@ github.com/tklauser/go-sysconf v0.3.14 h1:g5vzr9iPFFz24v2KZXs/pvpvh8/V9Fw6vQK5ZZ
github.com/tklauser/go-sysconf v0.3.14/go.mod h1:1ym4lWMLUOhuBOPGtRcJm7tEGX4SCYNEEEtghGG/8uY=
github.com/tklauser/numcpus v0.8.0 h1:Mx4Wwe/FjZLeQsK/6kt2EOepwwSl7SmJrK5bV/dXYgY=
github.com/tklauser/numcpus v0.8.0/go.mod h1:ZJZlAY+dmR4eut8epnzf0u/VwodKmryxR8txiloSqBE=
github.com/urfave/cli/v2 v2.27.3 h1:/POWahRmdh7uztQ3CYnaDddk0Rm90PyOgIxgW2rr41M=
github.com/urfave/cli/v2 v2.27.3/go.mod h1:m4QzxcD2qpra4z7WhzEGn74WZLViBnMpb1ToCAKdGRQ=
github.com/urfave/cli/v2 v2.27.4 h1:o1owoI+02Eb+K107p27wEX9Bb8eqIoZCfLXloLUSWJ8=
github.com/urfave/cli/v2 v2.27.4/go.mod h1:m4QzxcD2qpra4z7WhzEGn74WZLViBnMpb1ToCAKdGRQ=
github.com/vmihailenco/tagparser v0.1.2 h1:gnjoVuB/kljJ5wICEEOpx98oXMWPLj22G67Vbd1qPqc=
github.com/vmihailenco/tagparser v0.1.2/go.mod h1:OeAg3pn3UbLjkWt+rN9oFYB6u/cQgqMEUPoW2WPyhdI=
github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM=
Expand Down
28 changes: 14 additions & 14 deletions signer/frost_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,14 @@ func testFROSTKeyGen(ctx context.Context, require *require.Assertions, nodes []*
memo := mtg.EncodeMixinExtraBase64(node.conf.AppId, node.encryptOperation(op))
memo = hex.EncodeToString([]byte(memo))
out := &mtg.Action{
OutputId: uuid.Must(uuid.NewV4()).String(),
TransactionHash: crypto.Sha256Hash([]byte(op.Id)).String(),
UnifiedOutput: mtg.UnifiedOutput{
AppId: node.conf.AppId,
AssetId: node.conf.KeeperAssetId,
Extra: memo,
Amount: decimal.NewFromInt(1),
CreatedAt: time.Now(),
OutputId: uuid.Must(uuid.NewV4()).String(),
TransactionHash: crypto.Sha256Hash([]byte(op.Id)).String(),
AppId: node.conf.AppId,
AssetId: node.conf.KeeperAssetId,
Extra: memo,
Amount: decimal.NewFromInt(1),
CreatedAt: time.Now(),
},
}

Expand Down Expand Up @@ -87,14 +87,14 @@ func testFROSTSign(ctx context.Context, require *require.Assertions, nodes []*No
memo := mtg.EncodeMixinExtraBase64(node.conf.AppId, node.encryptOperation(sop))
memo = hex.EncodeToString([]byte(memo))
out := &mtg.Action{
OutputId: uuid.Must(uuid.NewV4()).String(),
TransactionHash: crypto.Sha256Hash([]byte(sop.Id)).String(),
UnifiedOutput: mtg.UnifiedOutput{
AppId: node.conf.AppId,
AssetId: node.conf.KeeperAssetId,
Extra: memo,
Amount: decimal.NewFromInt(1),
CreatedAt: time.Now(),
OutputId: uuid.Must(uuid.NewV4()).String(),
TransactionHash: crypto.Sha256Hash([]byte(sop.Id)).String(),
AppId: node.conf.AppId,
AssetId: node.conf.KeeperAssetId,
Extra: memo,
Amount: decimal.NewFromInt(1),
CreatedAt: time.Now(),
},
}
op := TestProcessOutput(ctx, require, nodes, out, sid)
Expand Down
16 changes: 8 additions & 8 deletions signer/signer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,15 +98,15 @@ func testCMPKeyGen(ctx context.Context, require *require.Assertions, nodes []*No
memo := mtg.EncodeMixinExtraBase64(node.conf.AppId, node.encryptOperation(op))
memo = hex.EncodeToString([]byte(memo))
out := &mtg.Action{
OutputId: uuid.Must(uuid.NewV4()).String(),
TransactionHash: crypto.Sha256Hash([]byte(op.Id)).String(),
UnifiedOutput: mtg.UnifiedOutput{
AppId: node.conf.AppId,
AssetId: node.conf.KeeperAssetId,
Extra: memo,
Amount: decimal.NewFromInt(1),
CreatedAt: time.Now(),
Sequence: uint64(sequence + i),
OutputId: uuid.Must(uuid.NewV4()).String(),
TransactionHash: crypto.Sha256Hash([]byte(op.Id)).String(),
AppId: node.conf.AppId,
AssetId: node.conf.KeeperAssetId,
Extra: memo,
Amount: decimal.NewFromInt(1),
CreatedAt: time.Now(),
Sequence: uint64(sequence + i),
},
}

Expand Down

0 comments on commit 1b400a6

Please sign in to comment.