-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Set project as nullable #3042
Set project as nullable #3042
Changes from all commits
c921f55
7ed9343
06666c6
b314f95
29a1756
d5dfa49
e6a16e4
4888b77
d8c7b43
2fe0cb7
c821685
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,7 +16,6 @@ | |
using Neo.VM.Types; | ||
using Neo.Wallets; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using Array = System.Array; | ||
|
||
|
@@ -34,7 +33,7 @@ partial class MainService | |
/// <param name="data">Data</param> | ||
/// <param name="signersAccounts">Signer's accounts</param> | ||
[ConsoleCommand("transfer", Category = "NEP17 Commands")] | ||
private void OnTransferCommand(UInt160 tokenHash, UInt160 to, decimal amount, UInt160 from = null, string data = null, UInt160[] signersAccounts = null) | ||
private void OnTransferCommand(UInt160 tokenHash, UInt160 to, decimal amount, UInt160? from = null, string? data = null, UInt160[]? signersAccounts = null) | ||
{ | ||
var snapshot = NeoSystem.StoreView; | ||
var asset = new AssetDescriptor(snapshot, NeoSystem.Settings, tokenHash); | ||
|
@@ -45,7 +44,7 @@ private void OnTransferCommand(UInt160 tokenHash, UInt160 to, decimal amount, UI | |
Transaction tx; | ||
try | ||
{ | ||
tx = CurrentWallet.MakeTransaction(snapshot, new[] | ||
tx = CurrentWallet!.MakeTransaction(snapshot, new[] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. With nullable enabled, There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You shouldn't do There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also the reason why you are getting the warning for There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. With noWallet you can use ! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
How? |
||
{ | ||
new TransferOutput | ||
{ | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was a bug
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
someone must of changed the code, i don't write code like that.