Skip to content

Commit

Permalink
NiceHash Mining addr
Browse files Browse the repository at this point in the history
  • Loading branch information
S74nk0 committed Jun 21, 2022
1 parent 99cbba2 commit 7c4ef0a
Show file tree
Hide file tree
Showing 9 changed files with 21 additions and 208 deletions.
2 changes: 1 addition & 1 deletion src/NHMCore/Nhmws/V3/NHWebSocketV3.cs
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,7 @@ private static async Task<bool> miningSetUsername(string btc)
return userSetResult switch
{
NhmwsSetResult.CHANGED => true, // we return executed
NhmwsSetResult.INVALID => throw new RpcException("Bitcoin address invalid", ErrorCode.InvalidUsername),
NhmwsSetResult.INVALID => throw new RpcException("Mining Address invalid", ErrorCode.InvalidUsername),
NhmwsSetResult.NOTHING_TO_CHANGE => throw new RpcException($"Nothing to change btc \"{btc}\" already set", ErrorCode.RedundantRpc),
_ => throw new RpcException($"", ErrorCode.InternalNhmError),
};
Expand Down
2 changes: 1 addition & 1 deletion src/NHMCore/Nhmws/V4/NHWebSocketV4.cs
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@ private static async Task<bool> miningSetUsername(string btc)
return userSetResult switch
{
NhmwsSetResult.CHANGED => true, // we return executed
NhmwsSetResult.INVALID => throw new RpcException("Bitcoin address invalid", ErrorCode.InvalidUsername),
NhmwsSetResult.INVALID => throw new RpcException("Mining address invalid", ErrorCode.InvalidUsername),
NhmwsSetResult.NOTHING_TO_CHANGE => throw new RpcException($"Nothing to change btc \"{btc}\" already set", ErrorCode.RedundantRpc),
_ => throw new RpcException($"", ErrorCode.InternalNhmError),
};
Expand Down
2 changes: 1 addition & 1 deletion src/NiceHashMiner/Validators/BtcWorkerValidator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public override ValidationResult Validate(string value, CultureInfo cultureInfo)

if (result == NhmwsSetResult.INVALID)
{
return new ValidationResult(false, Translations.Tr("Invalid Bitcoin address! {0} will start mining in DEMO mode. In the DEMO mode, you can test run the miner and be able see how much you can earn using your computer. Would you like to continue in DEMO mode?\n\nDISCLAIMER: YOU WILL NOT EARN ANYTHING DURING DEMO MODE!", NHMProductInfo.Name));
return new ValidationResult(false, Translations.Tr("Invalid address! {0} will start mining in DEMO mode. In the DEMO mode, you can test run the miner and be able see how much you can earn using your computer. Would you like to continue in DEMO mode?\n\nDISCLAIMER: YOU WILL NOT EARN ANYTHING DURING DEMO MODE!", NHMProductInfo.Name));
}

return ValidationResult.ValidResult;
Expand Down
6 changes: 3 additions & 3 deletions src/NiceHashMiner/Views/Common/EnterWalletDialog.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,13 @@
VerticalAlignment="Stretch"
HorizontalAlignment="Left"
Margin="24,0,0,0"
Text="Wallet"/>
Text="Mining Address"/>
<TextBlock Grid.Row="2"
Style="{StaticResource local.WalletSubHeader}"
VerticalAlignment="Stretch"
HorizontalAlignment="Left"
Margin="25,8,0,0"
Text="Wallet Address"/>
Text="Mining Address"/>
<TextBox Grid.Row="3"
Style="{StaticResource inputBox}"
x:Name="textBoxBTCAddress"
Expand All @@ -95,7 +95,7 @@
<TextBlock Grid.Row="4"
Margin="25,8,0,0">
<Hyperlink x:Name="addressHyperlink" RequestNavigate="AddressHyperlink_RequestNavigate" NavigateUri="https://www.nicehash.com/support/general-help/account/creating-a-new-account" TextDecorations="{x:Null}" Foreground="{StaticResource Brushes.Light.Basic.NoticeColor}">
How to create a Wallet Address?
How to create a Mining Address?
</Hyperlink>
</TextBlock>
<Button Grid.Row="5"
Expand Down
14 changes: 7 additions & 7 deletions src/NiceHashMiner/Views/Common/EnterWalletDialogDemo.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -85,17 +85,17 @@
TextAlignment="Left"
VerticalAlignment="Stretch"
HorizontalAlignment="Left"
Margin="25,8,6,0">
<Run Text="You are currently mining in Demo Mode. "/>
<Run Text="Add your Wallet Address " FontWeight="Bold"/>
<Run Text="to start earning Bitcoins." />
</TextBlock>
Margin="25,8,6,0" >
<Run Text="You are currently mining in Demo Mode. "/>
<Run Text="Add your NiceHash Mining Address " FontWeight="Bold"/>
<Run Text="to start earning Bitcoins." />
</TextBlock>
<TextBlock Grid.Row="3"
Style="{StaticResource local.WalletSubHeader}"
VerticalAlignment="Stretch"
HorizontalAlignment="Left"
Margin="25,8,0,0"
Text="Wallet Address"/>
Text="NiceHash Mining Address"/>
<TextBox Grid.Row="4"
Style="{StaticResource inputBox}"
x:Name="textBoxBTCAddress"
Expand All @@ -107,7 +107,7 @@
<TextBlock Grid.Row="5"
Margin="25,8,0,0">
<Hyperlink x:Name="addressHyperlink" RequestNavigate="AddressHyperlink_RequestNavigate" NavigateUri="https://www.nicehash.com/support/general-help/account/creating-a-new-account" TextDecorations="{x:Null}" Foreground="{StaticResource Brushes.Light.Basic.NoticeColor}">
How to create a Wallet Address?
How to create a Mining Address?
</Hyperlink>
</TextBlock>
<Button Grid.Row="6"
Expand Down
2 changes: 1 addition & 1 deletion src/NiceHashMiner/Views/Dashboard/Dashboard.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@
TextAlignment="Left"
Text="Complete your mining setup"/>
<WrapPanel Orientation="Horizontal" Margin="0,8,0,0">
<Button Style="{StaticResource local.CompleteCredentialsButton}" Padding="16,13,16,13" Content="+ Add Wallet Address" Click="EnterBTCWallet_Button_Click" />
<Button Style="{StaticResource local.CompleteCredentialsButton}" Padding="16,13,16,13" Content="+ Add Mining Address" Click="EnterBTCWallet_Button_Click" />
</WrapPanel>
</StackPanel>
</Grid>
Expand Down
7 changes: 3 additions & 4 deletions src/NiceHashMiner/Views/DemoBTCNotice.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,18 +84,17 @@
VerticalAlignment="Stretch"
HorizontalAlignment="Left"
Margin="24,0,0,0"
Text="Enter Bitcoin Address Manually"/>
Text="Enter NiceHash Mining Address Manually"/>
<TextBlock Grid.Row="2"
Style="{StaticResource local.WalletSubHeader}"
TextWrapping="WrapWithOverflow"
TextAlignment="Left"
VerticalAlignment="Stretch"
HorizontalAlignment="Left"
Margin="25,8,6,0">
<Run Text="Add your " />
<Run Text="Bitcoin Wallet Address" FontWeight="Bold"/>
<Run Text="Add your" />
<Run Text="NiceHash Mining Address" FontWeight="Bold"/>
<Run Text="to start earning Bitcoins." />
<Run Text="We strongly suggest using the wallet address provided on the NiceHash platform."/>
</TextBlock>

<TextBox Grid.Row="3"
Expand Down
2 changes: 1 addition & 1 deletion src/NiceHashMiner/Views/Login/LoginWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@


<Button Style="{StaticResource local.TextButton}" Margin="0,12,0,0" HorizontalAlignment="Center" Content="Register a New Account" Click="Register_OnClick" />
<Button Style="{StaticResource local.TextButton}" Margin="0,12,0,0" HorizontalAlignment="Center" Content="Enter Bitcoin Address Manually" Click="ManuallyEnterBtc_OnClick" />
<Button Style="{StaticResource local.TextButton}" Margin="0,12,0,0" HorizontalAlignment="Center" Content="Enter NiceHash Mining Address Manually" Click="ManuallyEnterBtc_OnClick" />


<CheckBox Name="CheckBoxMode" HorizontalAlignment="Right" Style="{StaticResource NHMSwitchTheme}" Margin="0,0,24,0" Checked="CheckBoxMode_Checked_Dark" Unchecked="CheckBoxMode_Unchecked_Light" />
Expand Down
Loading

0 comments on commit 7c4ef0a

Please sign in to comment.