Skip to content

Commit

Permalink
chore: update polkadot backend version
Browse files Browse the repository at this point in the history
Signed-off-by: Minh Huy Tran <[email protected]>
  • Loading branch information
NhoxxKienn committed Apr 29, 2024
1 parent e08ec2c commit 13c62cf
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions payment-channel-dot/client/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@ func (c *PaymentClient) WireAddress() wire.Address {

// DotToPlanck converts a given amount in Dot to Planck.
func DotToPlanck(d *big.Float) *big.Int {
plankFloat := new(big.Float).Mul(d, new(big.Float).SetFloat64(dot.PlankPerDot))
plankFloat := new(big.Float).Mul(d, new(big.Float).SetFloat64(dot.PlanckPerDot))
plank, _ := plankFloat.Int(nil)
return plank
}

// PlanckToDot converts a given amount in Planck to Dot.
func PlanckToDot(d *big.Int) *dot.Dot {
return dot.NewDotFromPlank(d)
return dot.NewDotFromPlanck(d)
}
2 changes: 1 addition & 1 deletion payment-channel-dot/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.21

require (
github.com/centrifuge/go-substrate-rpc-client/v4 v4.2.1
github.com/perun-network/perun-polkadot-backend v0.2.1-0.20240411100708-029d9632b748
github.com/perun-network/perun-polkadot-backend v0.2.1-0.20240425071359-589d0ae7df6d
github.com/pkg/errors v0.9.1
perun.network/go-perun v0.10.6
)
Expand Down
2 changes: 2 additions & 0 deletions payment-channel-dot/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,8 @@ github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFSt
github.com/pborman/uuid v0.0.0-20170112150404-1b00554d8222/go.mod h1:VyrYX9gd7irzKovcSS6BIIEwPRkP2Wm2m9ufcdFSJ34=
github.com/perun-network/perun-polkadot-backend v0.2.1-0.20240411100708-029d9632b748 h1:nKTTy/mgfMza0x/qJ3ydzyAVwJfyPs/br6OOeP4IeTw=
github.com/perun-network/perun-polkadot-backend v0.2.1-0.20240411100708-029d9632b748/go.mod h1:qBlduBvrtUUz86dcqxEzgTID7psZ000WyucSWO2M6Qk=
github.com/perun-network/perun-polkadot-backend v0.2.1-0.20240425071359-589d0ae7df6d h1:XNERW32C3qi24oSPsC7WdRc9VNqWlTQAlgDUiCagsZs=
github.com/perun-network/perun-polkadot-backend v0.2.1-0.20240425071359-589d0ae7df6d/go.mod h1:cddzrhZ0iFylrhVsGyxdiiPrXwWMLMunoa3AtWfX/Qk=
github.com/peterh/liner v1.1.1-0.20190123174540-a2c9a5303de7/go.mod h1:CRroGNssyjTd/qIG2FyxByd2S8JEAZXBl4qUrZf8GS0=
github.com/pierrec/xxHash v0.1.5 h1:n/jBpwTHiER4xYvK3/CdPVnLDPchj8eTJFFLUb4QHBo=
github.com/pierrec/xxHash v0.1.5/go.mod h1:w2waW5Zoa/Wc4Yqe0wgrIYAGKqRMf7czn2HNKXmuL+I=
Expand Down

0 comments on commit 13c62cf

Please sign in to comment.