Skip to content

Commit 0202d56

Browse files
authored
Merge pull request #205 from qubic/dev
chore(release): promote dev to staging
2 parents 0c77eec + 169795d commit 0202d56

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+1294
-366
lines changed

.github/workflows/deploy.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,15 @@ on:
99
pull_request:
1010
types:
1111
- closed
12+
branches:
13+
- dev
14+
- staging
15+
- main
1216

1317
jobs:
1418
release-and-deploy:
19+
# Only run on push events OR when PR is actually merged (not just closed)
20+
if: github.event_name == 'push' || github.event.pull_request.merged == true
1521
runs-on: ubuntu-latest
1622
steps:
1723
- name: 🛎️ Checkout repository

dev-proxy.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ function createProxy(targetURL, port) {
2828
request({ url: targetURL + req.url, method: req.method, json: req.body, headers: {'Authorization': req.header('Authorization')} },
2929
function (error, response, body) {
3030
if (error) {
31-
console.error('error: ' + response.statusCode);
31+
console.error('error: ' + (response ? response.statusCode : error.message));
3232
}
3333
}).pipe(res);
3434
}

src/app/app.module.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ import { HistoryComponent } from './qearn/history/history.component';
9090
import { MatPaginatorModule } from '@angular/material/paginator';
9191
import { MatButtonToggleModule } from '@angular/material/button-toggle';
9292
import { StakeInputComponent } from './qearn/components/input-amount/stake-input.component';
93+
import { AmountInputDirective } from './directives/amount-input.directive';
9394
import { UnlockInputDialogComponent } from './qearn/components/unlock-input-dialog/unlock-input-dialog.component';
9495
import { BalanceHiddenComponent } from './core/balance-hidden/balance-hidden.component';
9596
import { SeedDisplayPipe } from './pipes/seed-display.pipe';
@@ -110,6 +111,7 @@ export const httpInterceptorProviders = [{ provide: HTTP_INTERCEPTORS, useClass:
110111
QearnComponent,
111112
StakingComponent,
112113
StakeInputComponent,
114+
AmountInputDirective,
113115
UnlockInputDialogComponent,
114116
HistoryComponent,
115117
LockComponent,

src/app/assets/assets.component.html

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,10 @@ <h2>{{ t("assetsComponent.form.info") }}</h2>
270270
<div class="col">
271271
<mat-form-field appearance="fill" class="full-width">
272272
<mat-label>{{ t("assetsComponent.form.amount") }}</mat-label>
273-
<input matInput type="number" formControlName="amount">
273+
<input matInput
274+
appAmountInput
275+
maxlength="19"
276+
formControlName="amount">
274277
<mat-error *ngIf="sendForm.controls['amount'].hasError('required')">
275278
{{ t("assetsComponent.form.amount.error") }}
276279
</mat-error>

src/app/assets/assets.component.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,6 @@ export class AssetsComponent implements OnInit, OnDestroy {
261261
}
262262
}
263263

264-
265264
refreshData(): void {
266265
this.loadAssets(true);
267266
}

src/app/balance/balance.component.html

Lines changed: 32 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ <h1>{{ t("general.navigation.balance") }}</h1>
4747
<mat-expansion-panel (opened)="panelOpenState.set(true)" (closed)="panelOpenState.set(false)">
4848
<mat-expansion-panel-header>
4949
<mat-panel-title>
50-
<qli-transfer-status [transaction]="transaction"></qli-transfer-status>
50+
<tx-status [transaction]="transaction" [lastArchivedTick]="(us.archiverLatestTick | async) ?? undefined"></tx-status>
5151
&nbsp;
5252
<span class="display-publicid disable-area">
5353
<a [href]="ExplorerUrlHelper.getAddressUrl(transaction.sourceId)"
@@ -60,7 +60,7 @@ <h1>{{ t("general.navigation.balance") }}</h1>
6060
{{ transaction.created | dateTime }}
6161
</span>
6262
<button
63-
*ngIf="isOwnId(transaction.sourceId) && currentTick > transaction.targetTick && transaction.status !== 'Pending' && isRepeatableTransaction(transaction.destId, transaction.type)"
63+
*ngIf="isOwnId(transaction.sourceId) && currentTick > transaction.targetTick && transaction.status !== 'Pending' && isRepeatableTransaction(transaction.destId, transaction.type, transaction.amount)"
6464
mat-icon-button matTooltip="{{ t('balanceComponent.repeatTransaction') }}"
6565
(click)="repeat(transaction)"><mat-icon>repeat</mat-icon></button>
6666
</mat-panel-title>
@@ -236,12 +236,7 @@ <h1>{{ t("general.navigation.balance") }}</h1>
236236
<mat-expansion-panel (opened)="panelOpenState.set(true)" (closed)="panelOpenState.set(false)">
237237
<mat-expansion-panel-header>
238238
<mat-panel-title>
239-
<span class="status-icon" *ngIf="+transaction.transactions[0].transaction.amount > 0">
240-
<mat-icon *ngIf="transaction.transactions[0].moneyFlew" style="color: yellowgreen;"
241-
matTooltip="{{ t('balanceComponent.transactions.status.executed.tooltip') }}">done</mat-icon>
242-
<mat-icon *ngIf="!transaction.transactions[0].moneyFlew" style="color: red"
243-
matTooltip="{{ t('balanceComponent.transactions.status.dismissed.tooltip') }}">clear</mat-icon>
244-
</span>
239+
<tx-status [archivedTx]="transaction.transactions[0]"></tx-status>
245240
&nbsp;
246241
<span class="display-publicid disable-area">
247242
<a [href]="ExplorerUrlHelper.getAddressUrl(transaction.transactions[0].transaction.sourceId)"
@@ -256,7 +251,7 @@ <h1>{{ t("general.navigation.balance") }}</h1>
256251
&nbsp;
257252
{{ transaction.transactions[0].timestamp | dateTime }}
258253
</span>
259-
<button *ngIf="isOwnId(transaction.transactions[0].transaction.sourceId) && isRepeatableTransaction(transaction.transactions[0].transaction.destId, transaction.transactions[0].transaction.inputType)" mat-icon-button
254+
<button *ngIf="isOwnId(transaction.transactions[0].transaction.sourceId) && isRepeatableTransaction(transaction.transactions[0].transaction.destId, transaction.transactions[0].transaction.inputType, +transaction.transactions[0].transaction.amount)" mat-icon-button
260255
matTooltip="{{ t('balanceComponent.repeatTransaction') }}"
261256
(click)="repeatTransactionArchiver(transaction.transactions[0].transaction)"><mat-icon>repeat</mat-icon></button>
262257
</mat-panel-title>
@@ -315,7 +310,7 @@ <h1>{{ t("general.navigation.balance") }}</h1>
315310
<span class="label">{{ t("balanceComponent.transaction.source") }}</span>
316311
</div>
317312
<div class="col-value disable-area">
318-
<span class="value display-publicid"> <a
313+
<span class="value"> <a
319314
[href]="ExplorerUrlHelper.getAddressUrl(transaction.transactions[0].transaction.sourceId)"
320315
target="_blank">
321316
{{getAddressDisplayName(transaction.transactions[0].transaction.sourceId)}}
@@ -398,6 +393,33 @@ <h1>{{ t("general.navigation.balance") }}</h1>
398393
</span>
399394
</div>
400395
</div>
396+
<!-- SendMany transfers list (lazy loaded on expand) -->
397+
<ng-container *ngIf="isSendManyTransaction(transaction.transactions[0].transaction.destId, transaction.transactions[0].transaction.inputType)">
398+
<ng-container *ngIf="getSendManyTransfer(transaction.transactions[0].transaction.txId) as transfers">
399+
<div class="sendmany-list" *ngIf="isSendManyExpanded(transaction.transactions[0].transaction.txId)">
400+
<div class="sendmany-header label">
401+
{{ t("balanceComponent.transaction.transfersCount", { count: transfers.length }) }}
402+
</div>
403+
<div class="row sendmany-item" *ngFor="let transfer of transfers">
404+
<span class="sendmany-dest value disable-area">
405+
<a [href]="ExplorerUrlHelper.getAddressUrl(transfer.destId)" target="_blank">{{ getAddressDisplayName(transfer.destId) }}</a>
406+
<mat-icon class="icon-color-link icon"
407+
matTooltip="{{ t('general.copy.tooltip') }}"
408+
[cdkCopyToClipboard]="transfer.destId">content_copy</mat-icon>
409+
</span>
410+
<span class="sendmany-amount secondary">
411+
{{ transfer.amount | number: '1.0-0' }}&nbsp;{{ t("general.currency") }}
412+
</span>
413+
</div>
414+
</div>
415+
</ng-container>
416+
<div style="text-align: center;">
417+
<button mat-button class="sendmany-toggle secondary" (click)="toggleSendManyExpanded(transaction)">
418+
<mat-icon>{{ isSendManyExpanded(transaction.transactions[0].transaction.txId) ? 'expand_less' : 'expand_more' }}</mat-icon>
419+
{{ isSendManyExpanded(transaction.transactions[0].transaction.txId) ? t("balanceComponent.transaction.hideTransfers") : t("balanceComponent.transaction.showTransfers") }}
420+
</button>
421+
</div>
422+
</ng-container>
401423
</mat-card-content>
402424
</mat-card>
403425
</div>

src/app/balance/balance.component.scss

Lines changed: 15 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
@import "../../vars.scss";
22

3-
43
.full-width {
54
width: 100%;
65
}
@@ -9,22 +8,15 @@
98
display: flex;
109
justify-content: center;
1110
align-items: center;
12-
padding: 20px 0px 20px 0px;
11+
padding: 20px 0;
1312
}
1413

1514
.eye {
1615
display: flex;
1716
justify-content: flex-end;
1817
align-items: center;
19-
20-
.eye-icon {
21-
cursor: pointer;
22-
margin-left: 10px;
23-
}
2418
}
2519

26-
27-
2820
.transaction-list-compact {
2921
display: flex;
3022
flex-direction: row;
@@ -33,20 +25,8 @@
3325
align-items: center;
3426
column-gap: 10px;
3527

36-
.col-title {
37-
// font-weight: bold;
38-
min-width: 180px;
39-
display: flex;
40-
}
41-
42-
.copy {
43-
width: inherit;
44-
font-family: "Space Mono";
45-
}
46-
47-
4828
.responsive-card {
49-
margin-bottom: 0px;
29+
margin-bottom: 0;
5030
}
5131

5232
.row {
@@ -80,6 +60,10 @@
8060
align-items: flex-start;
8161
}
8262

63+
.col-value {
64+
text-align: left;
65+
}
66+
8367
.value {
8468
text-align: left;
8569
margin-top: 4px;
@@ -99,13 +83,8 @@
9983
.send {
10084
color: red;
10185
}
102-
103-
.trans-date {
104-
font-size: 0.9em;
105-
}
10686
}
10787

108-
10988
.mat-accordion .mat-expansion-panel:first-of-type {
11089
margin-bottom: 10px;
11190
}
@@ -119,12 +98,10 @@
11998

12099
.mat-expansion-panel-header-description {
121100
text-align: right;
122-
// font-family: "Space Mono";
123101
flex-grow: initial;
124102
margin-right: 1px;
125103
}
126104

127-
128105
mat-card {
129106
width: 100%;
130107
}
@@ -137,7 +114,6 @@ mat-card {
137114
padding: 15px;
138115
}
139116

140-
141117
.icon-color-link {
142118
color: var(--mat-expansion-header-description-color);
143119
}
@@ -148,7 +124,6 @@ mat-card {
148124

149125
.icon {
150126
transform: scale(0.8);
151-
/* Optional: Adjust the vertical alignment if needed */
152127
vertical-align: middle;
153128
cursor: pointer;
154129
}
@@ -201,17 +176,11 @@ mat-card {
201176
}
202177
}
203178

204-
205179
.ticks {
206180
font-size: 1.2em;
207181
color: grey;
208182
}
209183

210-
.status-icon {
211-
padding-left: 6px;
212-
padding-right: 2px;
213-
}
214-
215184
.alert-wrapper {
216185
padding: 0 16px;
217186
margin-bottom: 16px;
@@ -287,4 +256,12 @@ mat-card {
287256
.address-name-full {
288257
display: inline;
289258
}
290-
}
259+
}
260+
261+
.sendmany-list { display: flex; flex-direction: column; gap: 8px; background: rgba(255,255,255,.03); border-radius: 8px; padding: 12px; margin-top: 16px; margin-bottom: 12px; }
262+
.sendmany-header { margin-bottom: 0; padding-bottom: 8px; }
263+
.sendmany-item { margin-bottom: 0; }
264+
.sendmany-dest { word-break: break-all; flex: 1; min-width: 0; }
265+
.sendmany-amount { white-space: nowrap; text-align: right; }
266+
.sendmany-toggle { font-size: 1em; }
267+
@media (max-width: 600px) { .sendmany-item { flex-direction: column; align-items: flex-start; } .sendmany-amount { text-align: left; margin-top: 4px; } }

0 commit comments

Comments
 (0)