Skip to content

Commit

Permalink
Fixed missing null checks
Browse files Browse the repository at this point in the history
  • Loading branch information
limemloh committed Sep 11, 2024
1 parent d3d25df commit 4ce1293
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Types/AccountTransactionEffects.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ internal static IAccountTransactionEffects From(Grpc.V2.AccountTransactionEffect
new AccountTransfer(
CcdAmount.From(effects.AccountTransfer.Amount),
AccountAddress.From(effects.AccountTransfer.Receiver),
OnChainData.From(effects.AccountTransfer.Memo)),
effects.AccountTransfer.Memo == null ? null : OnChainData.From(effects.AccountTransfer.Memo)),
Grpc.V2.AccountTransactionEffects.EffectOneofCase.BakerAdded =>
new BakerAdded(BakerKeysEvent.From(
effects.BakerAdded.KeysEvent),
Expand All @@ -45,7 +45,7 @@ internal static IAccountTransactionEffects From(Grpc.V2.AccountTransactionEffect
new EncryptedAmountTransferred(
EncryptedAmountRemovedEvent.From(effects.EncryptedAmountTransferred.Removed),
NewEncryptedAmountEvent.From(effects.EncryptedAmountTransferred.Added),
OnChainData.From(effects.EncryptedAmountTransferred.Memo)
effects.EncryptedAmountTransferred.Memo == null ? null : OnChainData.From(effects.EncryptedAmountTransferred.Memo)
),
Grpc.V2.AccountTransactionEffects.EffectOneofCase.TransferredToEncrypted =>
new TransferredToEncrypted(
Expand All @@ -57,7 +57,7 @@ internal static IAccountTransactionEffects From(Grpc.V2.AccountTransactionEffect
new TransferredWithSchedule(
AccountAddress.From(effects.TransferredWithSchedule.Receiver),
effects.TransferredWithSchedule.Amount.Select(a => (a.Timestamp.ToDateTimeOffset(), a.Amount.ToCcd())).ToList(),
OnChainData.From(effects.TransferredWithSchedule.Memo)
effects.TransferredWithSchedule.Memo == null ? null : OnChainData.From(effects.TransferredWithSchedule.Memo)
),
Grpc.V2.AccountTransactionEffects.EffectOneofCase.CredentialKeysUpdated =>
CredentialKeysUpdated.From(effects.CredentialKeysUpdated),
Expand Down

0 comments on commit 4ce1293

Please sign in to comment.