Skip to content

Commit

Permalink
Merge pull request #1797 from numbersprotocol/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
shc261392 authored Jul 6, 2022
2 parents 6eb9d2d + f71bc4b commit 804461e
Show file tree
Hide file tree
Showing 9 changed files with 207 additions and 138 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## 0.60.1 - 2022-07-06

### Fixed

- Move wallet address QR code to deposit page

## 0.60.0 - 2022-07-05

### Added
Expand Down
4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ android {
applicationId "io.numbersprotocol.capturelite"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 420
versionName "0.60.0"
versionCode 421
versionName "0.60.1"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildFeatures {
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "capture-lite",
"version": "0.60.0",
"version": "0.60.1",
"author": "numbersprotocol",
"homepage": "https://numbersprotocol.io/",
"scripts": {
Expand Down
3 changes: 2 additions & 1 deletion src/app/features/wallets/transfer/transfer.module.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import { NgModule } from '@angular/core';
import { NgxQRCodeModule } from '@techiediaries/ngx-qrcode';
import { SharedModule } from '../../../shared/shared.module';
import { TransferLoadingComponent } from './transfer-loading/transfer-loading.component';
import { TransferRequestSentComponent } from './transfer-request-sent/transfer-request-sent.component';
import { TransferPageRoutingModule } from './transfer-routing.module';
import { TransferPage } from './transfer.page';

@NgModule({
imports: [SharedModule, TransferPageRoutingModule],
imports: [SharedModule, TransferPageRoutingModule, NgxQRCodeModule],
declarations: [
TransferPage,
TransferLoadingComponent,
Expand Down
277 changes: 162 additions & 115 deletions src/app/features/wallets/transfer/transfer.page.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,119 +6,166 @@
</mat-toolbar>

<ion-content *transloco="let t">
<ion-card id="main-card">
<ion-grid>
<ion-row id="in-app-transfer-row">
<ion-col size="2">
<ion-icon id="in-app-transfer-wallet-icon" name="wallet"></ion-icon>
</ion-col>
<ion-col size="8">
<h6>{{ t('wallets.inAppTransfer') }}</h6>
<p>{{ t('wallets.moveNumBetweenAssetWallet') }}</p>
<p>{{ t('wallets.andIntegrityWallet') }}</p>
</ion-col>
<ion-col>
<ion-img
id="num-icon-svg"
src="../../../assets/images/num-icon.svg"
></ion-img>
</ion-col>
</ion-row>
<ion-row class="wallet-info-row">
<ion-col size="7">
<h1>
{{
mode === 'withdraw'
? t('wallets.assetWallet')
: t('wallets.integrityWallet')
}}
</h1>
</ion-col>
<ion-col offset="0.5">
<h6>BEP20</h6>
<h5>
{{
(mode === 'withdraw'
? assetWalletBscNumBalance$
: integrityWalletBscNumBalance$
)
| ngrxPush
| currency
}}
</h5>
</ion-col>
</ion-row>
<ion-row id="divider-row">
<ion-icon id="direction-icon" name="arrow-down-circle"></ion-icon>
<div id="horizontal-divider"></div>
</ion-row>
<ion-row class="wallet-info-row">
<ion-col size="7">
<h1>
{{
mode === 'withdraw'
? t('wallets.integrityWallet')
: t('wallets.assetWallet')
}}
</h1>
</ion-col>
<ion-col offset="0.5">
<h6>BEP20</h6>
<h5>
{{
(mode === 'withdraw'
? integrityWalletBscNumBalance$
: assetWalletBscNumBalance$
)
| ngrxPush
| currency
}}
</h5>
</ion-col>
</ion-row>
<ion-row>
<ion-input
id="transfer-amount-input"
[placeholder]="t('wallets.enterAmount')"
[(ngModel)]="transferAmount"
type="number"
(input)="onInputTransferAmount()"
></ion-input>
</ion-row>
</ion-grid>
</ion-card>
<ion-card id="bottom-card" *ngIf="keyboardIsHidden$ | ngrxPush">
<ion-grid>
<ion-row>
<ion-col size="2">
<ion-icon name="wallet"></ion-icon>
</ion-col>
<ion-col size="5" *ngrxLet="gasFee$ as gasFee">
<h6 class="gas-fee-text">
{{ t('wallets.gasFee') }}:
{{ gasFee > 0 ? (gasFee | number: '1.2-2') : t('wallets.pending') }}
</h6>
<h4 class="wallet-total-text">
{{ t('wallets.total') }} {{ totalCost$ | ngrxPush | currency }}
</h4>
</ion-col>
<ion-col id="deposit-withdraw-btn-col">
<ion-button
*ngIf="!readyToSend"
fill="outline"
expand="block"
(click)="calculateGasFee()"
>{{ t('wallets.calculateGasFee') }}</ion-button
>
<ion-button
*ngIf="readyToSend"
fill="outline"
expand="block"
(click)="transfer()"
>{{ t('wallets.' + mode) }}</ion-button
>
</ion-col>
</ion-row>
</ion-grid>
</ion-card>
<div *ngIf="mode === 'deposit'">
<div class="vertical-pacing-12"></div>
<div class="asset-wallet-qr-code-container">
{{ t('wallets.myAssetWalletQRCode') }}
<div class="qr-code-info">
{{ t('wallets.myAssetWalletQRCodeInfo') }}
</div>
<div class="vertical-pacing-12"></div>
<ngx-qrcode
[elementType]="elementType"
[value]="assetWalletAddr$ | ngrxPush"
cssClass="qr-code"
[margin]="0"
[width]="150"
>
</ngx-qrcode>
</div>

<mat-list>
<mat-list-item>
<mat-icon svgIcon="wallet" mat-list-icon></mat-icon>
<div mat-line>
{{ t('wallets.myAssetWallet') }}
<ion-icon
class="info-icon"
name="information-circle"
#assetWalletTooltip="matTooltip"
(click)="assetWalletTooltip.toggle()"
[matTooltip]="t('wallets.myAssetWalletTooltip')"
></ion-icon>
</div>
<div mat-line>{{ assetWalletAddr$ | ngrxPush }}</div>
<button
mat-icon-button
*ngIf="assetWalletAddr$ | ngrxPush as assetWalletAddr"
(click)="copyToClipboard(assetWalletAddr)"
>
<mat-icon>content_copy</mat-icon>
</button>
</mat-list-item>
</mat-list>
</div>

<div *ngIf="mode === 'withdraw'">
<ion-card id="main-card">
<ion-grid>
<ion-row id="in-app-transfer-row">
<ion-col size="2">
<ion-icon id="in-app-transfer-wallet-icon" name="wallet"></ion-icon>
</ion-col>
<ion-col size="8">
<h6>{{ t('wallets.inAppTransfer') }}</h6>
<p>{{ t('wallets.moveNumBetweenAssetWallet') }}</p>
<p>{{ t('wallets.andIntegrityWallet') }}</p>
</ion-col>
<ion-col>
<ion-img
id="num-icon-svg"
src="../../../assets/images/num-icon.svg"
></ion-img>
</ion-col>
</ion-row>
<ion-row class="wallet-info-row">
<ion-col size="7">
<h1>
{{
mode === 'withdraw'
? t('wallets.assetWallet')
: t('wallets.integrityWallet')
}}
</h1>
</ion-col>
<ion-col offset="0.5">
<h6>BEP20</h6>
<h5>
{{
(mode === 'withdraw'
? assetWalletBscNumBalance$
: integrityWalletBscNumBalance$
)
| ngrxPush
| currency
}}
</h5>
</ion-col>
</ion-row>
<ion-row id="divider-row">
<ion-icon id="direction-icon" name="arrow-down-circle"></ion-icon>
<div id="horizontal-divider"></div>
</ion-row>
<ion-row class="wallet-info-row">
<ion-col size="7">
<h1>
{{
mode === 'withdraw'
? t('wallets.integrityWallet')
: t('wallets.assetWallet')
}}
</h1>
</ion-col>
<ion-col offset="0.5">
<h6>BEP20</h6>
<h5>
{{
(mode === 'withdraw'
? integrityWalletBscNumBalance$
: assetWalletBscNumBalance$
)
| ngrxPush
| currency
}}
</h5>
</ion-col>
</ion-row>
<ion-row>
<ion-input
id="transfer-amount-input"
[placeholder]="t('wallets.enterAmount')"
[(ngModel)]="transferAmount"
type="number"
(input)="onInputTransferAmount()"
></ion-input>
</ion-row>
</ion-grid>
</ion-card>
<ion-card id="bottom-card" *ngIf="keyboardIsHidden$ | ngrxPush">
<ion-grid>
<ion-row>
<ion-col size="2">
<ion-icon name="wallet"></ion-icon>
</ion-col>
<ion-col size="5" *ngrxLet="gasFee$ as gasFee">
<h6 class="gas-fee-text">
{{ t('wallets.gasFee') }}:
{{
gasFee > 0 ? (gasFee | number: '1.2-2') : t('wallets.pending')
}}
</h6>
<h4 class="wallet-total-text">
{{ t('wallets.total') }} {{ totalCost$ | ngrxPush | currency }}
</h4>
</ion-col>
<ion-col id="deposit-withdraw-btn-col">
<ion-button
*ngIf="!readyToSend"
fill="outline"
expand="block"
(click)="calculateGasFee()"
>{{ t('wallets.calculateGasFee') }}</ion-button
>
<ion-button
*ngIf="readyToSend"
fill="outline"
expand="block"
(click)="transfer()"
>{{ t('wallets.' + mode) }}</ion-button
>
</ion-col>
</ion-row>
</ion-grid>
</ion-card>
</div>
</ion-content>
18 changes: 18 additions & 0 deletions src/app/features/wallets/transfer/transfer.page.scss
Original file line number Diff line number Diff line change
Expand Up @@ -175,3 +175,21 @@ ion-card {
border-radius: 5px;
}
}

.asset-wallet-qr-code-container {
max-width: 300px;
margin: 0 auto;
display: flex;
flex-direction: column;
align-items: center;
}

.qr-code-info {
text-align: center;
opacity: 0.6;
font-size: 12px;
}

.vertical-pacing-12 {
height: 12px;
}
Loading

0 comments on commit 804461e

Please sign in to comment.