You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Parameter transaction is null when TransactionViewModel.Initialize(transaction) is called from MessageBus.Current.Listen<TransactionAdded>() in class TransactionsViewModel
#2
Open
mwherman2000 opened this issue
Jan 13, 2018
· 3 comments
Parameter transaction is null when TransactionViewModel.Initialize(transaction) is called from MessageBus.Current.Listen() in class TransactionsViewModel... Here is a copy of the calling code:
MessageBus.Current.Listen().Subscribe(async x =>
{
if (Util.Utils.IsValidUrl(Url))
{
var web3 = new Web3.Web3(Url);
var transactionViewModel = new TransactionViewModel();
var transaction = await web3.Eth.Transactions.GetTransactionByHash.SendRequestAsync(x.TransactionHash);
transactionViewModel.Initialise(transaction);
transactionViewModel.Status = TransactionViewModel.STATUS_INPROGRESS;
lock (receiptsCheckLock)
{
Transactions.Add(transactionViewModel)
}
}
});
The text was updated successfully, but these errors were encountered:
In what scenario you see this? There is not much (if any) error handling in the sample. But when a transaction is sent, the transaction hash is put in the bus.
I guess the extra data might have made the transaction to be rejected, and removed from pending before being able to retrieve it. So yes a null check might come handy there.
Parameter transaction is null when TransactionViewModel.Initialize(transaction) is called from MessageBus.Current.Listen() in class TransactionsViewModel... Here is a copy of the calling code:
MessageBus.Current.Listen().Subscribe(async x =>
{
if (Util.Utils.IsValidUrl(Url))
{
var web3 = new Web3.Web3(Url);
var transactionViewModel = new TransactionViewModel();
var transaction = await web3.Eth.Transactions.GetTransactionByHash.SendRequestAsync(x.TransactionHash);
transactionViewModel.Initialise(transaction);
transactionViewModel.Status = TransactionViewModel.STATUS_INPROGRESS;
lock (receiptsCheckLock)
{
Transactions.Add(transactionViewModel)
}
}
});
The text was updated successfully, but these errors were encountered: