Skip to content

Commit

Permalink
fix release yml and add network to base component
Browse files Browse the repository at this point in the history
  • Loading branch information
dangershony committed Oct 16, 2023
1 parent 5053be1 commit 66e6cbd
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 17 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ jobs:

env:
PROJECT_NAME: 'Blockcore.AtomicSwaps'
SOLUTION_PATH: 'src/Blockcore.AtomicSwaps.sln'
PROJECT_PATH: 'src/Blockcore.AtomicSwaps.Server/Blockcore.AtomicSwaps.Server.csproj'
SOLUTION_PATH: 'src/Angor.sln'
PROJECT_PATH: 'src/Angor/Server/Angor.Server.csproj'
BUILD_CONFIGURATION: 'Release'

steps:
Expand Down
14 changes: 0 additions & 14 deletions src/Angor/Client/Pages/Recover.razor
Original file line number Diff line number Diff line change
Expand Up @@ -253,8 +253,6 @@

private async Task FindInvestments()
{
var network = _NetworkConfiguration.GetNetwork();

var trxs = await _IndexerService.GetInvestmentsAsync(project.ProjectIdentifier);

var trx = trxs.First(f => f.TransactionId == recoverySigs.TransactionId);
Expand Down Expand Up @@ -364,8 +362,6 @@

private async Task PrepareToRecoverCoins()
{
var network = _NetworkConfiguration.GetNetwork();

var operationResult = await notificationComponent.LongOperation(async () =>
{
var feeEstimation = await _WalletOperations.GetFeeEstimationAsync();
Expand Down Expand Up @@ -418,8 +414,6 @@
{
showRecoveryModal = false;

var network = _NetworkConfiguration.GetNetwork();

storage.AddOrUpdateSignatures(recoverySigs);

var response = await _WalletOperations.PublishTransactionAsync(network, recoveryTransaction);
Expand All @@ -442,8 +436,6 @@

private async Task PrepareToReleaseCoins()
{
var network = _NetworkConfiguration.GetNetwork();

var operationResult = await notificationComponent.LongOperation(async () =>
{
var feeEstimation = await _WalletOperations.GetFeeEstimationAsync();
Expand Down Expand Up @@ -484,8 +476,6 @@
{
showRecoveryReleaseModal = false;

var network = _NetworkConfiguration.GetNetwork();

storage.AddOrUpdateSignatures(recoverySigs);

var response = await _WalletOperations.PublishTransactionAsync(network, releaseRecoveryTransaction);
Expand All @@ -509,8 +499,6 @@

private async Task PrepareEndOfProjectCoins()
{
var network = _NetworkConfiguration.GetNetwork();

var operationResult = await notificationComponent.LongOperation(async () =>
{
var feeEstimation = await _WalletOperations.GetFeeEstimationAsync();
Expand Down Expand Up @@ -547,8 +535,6 @@
{
showEndOfProjectModal = false;

var network = _NetworkConfiguration.GetNetwork();

storage.AddOrUpdateSignatures(recoverySigs);

var response = await _WalletOperations.PublishTransactionAsync(network, endOfProjectTransaction);
Expand Down
9 changes: 8 additions & 1 deletion src/Angor/Client/Shared/BaseComponent.cs
Original file line number Diff line number Diff line change
@@ -1,20 +1,26 @@
using Angor.Client.Storage;
using Angor.Shared;
using Blockcore.Networks;
using Microsoft.AspNetCore.Components;

namespace Angor.Client.Shared
{
public class BaseComponent : ComponentBase
{
[Inject]
protected INetworkConfiguration _networkConfiguration { get; set; }

[Inject]
protected IWalletStorage _walletStorage { get; set; }

[Inject]
protected NavigationManager NavigationManager { get; set; }


public NotificationComponent notificationComponent;
protected bool hasWallet { get; set; }

protected Network network { get; set; }

protected void SharedMethod()
{
// Shared logic here...
Expand All @@ -23,6 +29,7 @@ protected void SharedMethod()
protected override void OnInitialized()
{
hasWallet = _walletStorage.HasWallet();
network = _networkConfiguration.GetNetwork();
}
}
}

0 comments on commit 66e6cbd

Please sign in to comment.