@@ -5,13 +5,15 @@ import (
55 "time"
66
77 "github.com/iotaledger/hive.go/core/identity"
8- "github.com/iotaledger/hive.go/core/types/confirmation"
8+
9+ "github.com/iotaledger/goshimmer/packages/core/confirmation"
910
1011 "github.com/iotaledger/goshimmer/client"
1112 "github.com/iotaledger/goshimmer/client/wallet"
1213 "github.com/iotaledger/goshimmer/packages/app/jsonmodels"
1314 "github.com/iotaledger/goshimmer/packages/protocol/ledger/utxo"
1415 "github.com/iotaledger/goshimmer/packages/protocol/ledger/vm/devnetvm"
16+ "github.com/iotaledger/goshimmer/packages/protocol/models"
1517)
1618
1719type ServersStatus []* wallet.ServerStatus
@@ -172,7 +174,7 @@ type Client interface {
172174 // SleepRateSetterEstimate sleeps for rate setter estimate.
173175 SleepRateSetterEstimate () (err error )
174176 // PostTransaction sends a transaction to the Tangle via a given client.
175- PostTransaction (tx * devnetvm.Transaction ) (utxo.TransactionID , error )
177+ PostTransaction (tx * devnetvm.Transaction ) (utxo.TransactionID , models. BlockID , error )
176178 // PostData sends the given data (payload) by creating a block in the backend.
177179 PostData (data []byte ) (blkID string , err error )
178180 // GetUnspentOutputForAddress gets the first unspent outputs of a given address.
@@ -239,7 +241,7 @@ func (c *WebClient) BroadcastFaucetRequest(address string, powTarget int) (err e
239241}
240242
241243// PostTransaction sends a transaction to the Tangle via a given client.
242- func (c * WebClient ) PostTransaction (tx * devnetvm.Transaction ) (txID utxo.TransactionID , err error ) {
244+ func (c * WebClient ) PostTransaction (tx * devnetvm.Transaction ) (txID utxo.TransactionID , blockID models. BlockID , err error ) {
243245 txBytes , err := tx .Bytes ()
244246 if err != nil {
245247 return
@@ -253,6 +255,10 @@ func (c *WebClient) PostTransaction(tx *devnetvm.Transaction) (txID utxo.Transac
253255 if err != nil {
254256 return
255257 }
258+ err = blockID .FromBase58 (resp .BlockID )
259+ if err != nil {
260+ return
261+ }
256262 return
257263}
258264
0 commit comments