Skip to content
Projects
Groups
Snippets
Help
Sign in / Register
Toggle navigation
Minds Frontend
Project overview
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Locked Files
Issues
405
Merge Requests
67
CI / CD
Security & Compliance
Packages
Analytics
Wiki
Snippets
Members
Collapse sidebar
Close sidebar
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Minds
Minds Frontend
Commits
f8bd92e2
Commit
f8bd92e2
authored
10 hours ago
by
Olivia Madrid
Browse files
Options
Download
remove comments and todos
parent
5d993dc3
epic/wallet-80
1 merge request
!686
WIP: Epic/wallet 80
Pipeline
#119316173
running with stages
Changes
14
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
21 additions
and
128 deletions
+21
-128
src/app/modules/wallet/v2/balance-cash/balance-cash.component.ts
View file @
f8bd92e2
...
...
@@ -6,7 +6,6 @@ import {
Input
,
Output
,
EventEmitter
,
OnDestroy
,
}
from
'
@angular/core
'
;
import
{
Client
}
from
'
../../../../services/api/client
'
;
import
{
Session
}
from
'
../../../../services/session
'
;
...
...
@@ -15,9 +14,7 @@ import {
WalletCurrency
,
SplitBalance
,
}
from
'
../dashboard.service
'
;
import
{
ActivatedRoute
,
ParamMap
}
from
'
@angular/router
'
;
import
*
as
moment
from
'
moment
'
;
import
{
Subscription
}
from
'
rxjs
'
;
import
{
ConfigsService
}
from
'
../../../../common/services/configs.service
'
;
@
Component
({
selector
:
'
m-walletBalance--cash
'
,
...
...
@@ -29,10 +26,10 @@ export class WalletBalanceCashComponent implements OnInit {
@
Input
()
viewId
:
string
;
@
Input
()
cashWallet
:
WalletCurrency
;
// TODOOJM
// private _cashWallet: WalletCurrency;
// @Input() set cashWallet(value: WalletCurrency) {
// this._cashWallet = value;
// this.load();
// }
// get wallet(): WalletCurrency {
// return this._cashWallet;
...
...
@@ -52,28 +49,31 @@ export class WalletBalanceCashComponent implements OnInit {
protected
cd
:
ChangeDetectorRef
,
protected
session
:
Session
,
protected
walletService
:
WalletDashboardService
,
// protected route: ActivatedRoute,
private
configs
:
ConfigsService
)
{}
ngOnInit
()
{
// TODOOJM confirm that Mark has migrated all stripe accts to monthly intervals
// TODOOJM OR just get the payout date from the stripe account itself
this
.
load
();
// TODO confirm that Mark has migrated all stripe accts to monthly intervals
// OR just get the payout date from the stripe account itself
this
.
nextPayoutDate
=
moment
()
.
endOf
(
'
month
'
)
.
format
(
'
ddd Do MMM
'
);
if
(
this
.
configs
.
get
(
'
pro
'
))
{
this
.
getProEarnings
();
}
this
.
init
=
true
;
this
.
detectChanges
();
}
load
()
{
this
.
hasAccount
=
this
.
cashWallet
.
stripeDetails
.
hasAccount
;
this
.
hasBank
=
this
.
cashWallet
.
stripeDetails
.
hasBank
;
this
.
pendingBalance
=
this
.
cashWallet
.
stripeDetails
.
pendingBalanceSplit
;
this
.
totalPaidOut
=
this
.
cashWallet
.
stripeDetails
.
totalPaidOutSplit
;
this
.
currency
=
this
.
hasBank
?
this
.
cashWallet
.
label
:
'
USD
'
;
if
(
this
.
configs
.
get
(
'
pro
'
))
{
this
.
getProEarnings
();
}
this
.
init
=
true
;
this
.
detectChanges
();
}
...
...
This diff is collapsed.
src/app/modules/wallet/v2/chart/chart.component.html
View file @
f8bd92e2
<ng-container
*ngIf=
"!inProgress && dashboard"
>
<
!-- <
ng-container *ngIf="!inProgress && dashboard">
<m-timespanFilter
[timespans]="dashboard.timespans"
[activeTimespanId]="activeTimespan.id"
...
...
@@ -14,4 +14,4 @@
</ng-container>
<div *ngIf="inProgress || !dashboard" class="m-wallet__spinner">
<div class="mdl-spinner mdl-js-spinner is-active" [mdl]></div>
</div>
</div>
-->
This diff is collapsed.
src/app/modules/wallet/v2/dashboard.component.html
View file @
f8bd92e2
...
...
@@ -79,7 +79,6 @@
*ngIf=
"activeCurrencyId === 'tokens'"
></m-walletTransactions--tokens>
<m-walletTransactions--cash
[cashWallet]=
"wallet.cash"
*ngIf=
"activeCurrencyId === 'cash'"
[noAccount]=
"wallet.cash.address === null"
></m-walletTransactions--cash>
...
...
This diff is collapsed.
src/app/modules/wallet/v2/dashboard.service.ts
View file @
f8bd92e2
...
...
@@ -224,7 +224,6 @@ export class WalletDashboardService {
this
.
wallet
.
cash
.
stripeDetails
=
this
.
stripeDetails
;
account
=
{
...
account
,
...
this
.
stripeDetails
};
console
.
log
(
account
);
return
account
;
}
catch
(
e
)
{
console
.
error
(
e
);
...
...
@@ -237,28 +236,14 @@ export class WalletDashboardService {
}
async
createStripeAccount
(
form
)
{
console
.
log
(
'
~~~service: createStripeAccount
'
);
this
.
client
.
put
(
'
api/v2/wallet/usd/account
'
,
form
)
.
then
((
response
:
any
)
=>
{
console
.
log
(
'
~~~service: createStripeAccount: response
'
,
response
);
return
response
;
})
.
catch
(
e
=>
{
console
.
error
(
e
.
message
);
});
// try {
// const response = <any>(
// await this.client.put('api/v2/wallet/usd/account', form)
// );
// console.log('~~~service: createStripeAccount: response', response);
// return response;
// } catch (e) {
// console.error(e);
// return e;
// }
}
async
addStripeBank
(
form
)
{
...
...
This diff is collapsed.
src/app/modules/wallet/v2/phone-verification/phone-verification.component.html
View file @
f8bd92e2
...
...
@@ -11,12 +11,7 @@
To start earning rewards, you will need to enter a unique phone number.
</p>
</div>
<!-- TODOOJM: check on the enter key behavior -->
<form
[formGroup]=
"form"
(keyup.enter)=
"onSubmit()"
class=
"m-walletButtonLayout--buttonInline"
>
<form
[formGroup]=
"form"
class=
"m-walletButtonLayout--buttonInline"
>
<div
class=
"m-walletForm__fieldsContainer"
>
<div
class=
"m-walletForm__field--text stretchedField"
*ngIf=
"!confirming"
>
<div
class=
"m-walletForm__row--label"
>
...
...
@@ -74,22 +69,6 @@
</div>
</div>
</div>
<!-- <m-shadowboxSubmitButton
*ngIf="!confirming"
[disabled]="inProgress"
[saving]="inProgress"
(click)="onSubmit()"
>
Send Verification
</m-shadowboxSubmitButton>
<m-shadowboxSubmitButton
*ngIf="confirming"
[disabled]="inProgress"
[saving]="inProgress"
(click)="onSubmit()"
>
Verify Code
</m-shadowboxSubmitButton> -->
<m-shadowboxSubmitButton
[disabled]=
"inProgress"
[saving]=
"inProgress"
...
...
This diff is collapsed.
src/app/modules/wallet/v2/phone-verification/phone-verification.component.scss
View file @
f8bd92e2
...
...
@@ -21,16 +21,7 @@ m-walletPhoneVerification {
}
}
// m-shadowboxSubmitButton {
// width: 147px;
// button {
// width: 100%;
// }
// }
@media
screen
and
(
max-width
:
771px
)
{
// m-shadowboxSubmitButton {
// margin: 0 0 21px 0;
// }
.stretchedField
{
.m-walletForm__row--label
m-tooltip
{
.m-tooltip--bubble
{
...
...
@@ -38,7 +29,6 @@ m-walletPhoneVerification {
width
:
174px
;
}
}
// TODOOJM look into this
[
class
*=
'm-walletForm__row'
]
{
&
:not
(
.m-phoneInput__wrapper
)
{
flex-flow
:
row
wrap
;
...
...
This diff is collapsed.
src/app/modules/wallet/v2/rewards-popup/rewards-popup.component.scss
View file @
f8bd92e2
...
...
@@ -8,7 +8,7 @@ m-walletRewardsPopup {
line-height
:
18px
;
@include
m-theme
()
{
background-color
:
themed
(
$m-white
);
color
:
themed
(
$m-textColor--
second
ary
);
color
:
themed
(
$m-textColor--
terti
ary
);
box-shadow
:
0
0
10px
0
rgba
(
themed
(
$m-black
)
,
0
.1
);
}
...
...
This diff is collapsed.
src/app/modules/wallet/v2/settings-btc/settings-btc.component.ts
View file @
f8bd92e2
...
...
@@ -59,7 +59,7 @@ export class WalletSettingsBTCComponent implements OnInit {
}
validateAddressFormat
(
control
:
AbstractControl
)
{
// This allows for some false positives b
c
bech32 format allows for longer length
// This allows for some false positives b
ecause
bech32 format allows for longer length
// but will catch some negatives so is better than nothing
if
(
control
.
value
.
length
&&
...
...
@@ -84,7 +84,6 @@ export class WalletSettingsBTCComponent implements OnInit {
this
.
currentAddress
=
this
.
addressInput
.
value
;
this
.
showForm
=
false
;
}
catch
(
e
)
{
// TODOOJM get rid of form toast
this
.
formToastService
.
error
(
e
);
console
.
error
(
e
);
}
finally
{
...
...
This diff is collapsed.
src/app/modules/wallet/v2/settings-cash/cash-bank-form/cash-bank-form.component.ts
View file @
f8bd92e2
...
...
@@ -93,7 +93,6 @@ export class WalletCashBankFormComponent implements OnInit {
this
.
walletService
.
addStripeBank
(
this
.
form
.
value
)
.
then
((
response
:
any
)
=>
{
console
.
log
(
'
addBank response
'
,
response
);
this
.
editing
=
false
;
if
(
response
.
status
!==
'
error
'
)
{
...
...
@@ -137,6 +136,7 @@ export class WalletCashBankFormComponent implements OnInit {
this
.
detectChanges
();
}
// DISABLED b/c 'remove' button makes it redundant
// async leaveMonetization() {
// this.showModal = false;
// this.inProgress = true;
...
...
This diff is collapsed.
src/app/modules/wallet/v2/settings-cash/cash-onboarding/cash-onboarding.component.ts
View file @
f8bd92e2
...
...
@@ -82,7 +82,6 @@ export class WalletCashOnboardingComponent implements OnInit {
service
:
'
stripe
'
,
};
this
.
detectChanges
();
// this.router.navigate(['/wallet/usd/']);
}
catch
(
e
)
{
this
.
inProgress
=
false
;
this
.
error
=
e
.
message
;
...
...
@@ -90,47 +89,6 @@ export class WalletCashOnboardingComponent implements OnInit {
}
}
// async createAccount() {
// if (!this.form.valid) {
// return;
// }
// this.inProgress = true;
// this.error = '';
// this.detectChanges();
// console.log('createAccountFormval', this.form.value);
// this.walletService
// .createStripeAccount(this.form.value)
// .then((response: any) => {
// console.log('createAccount response', response);
// if (response && response.status !== 'error') {
// if (!this.user.programs) {
// this.user.programs = [];
// }
// this.user.programs.push('affiliate');
// this.user.merchant = {
// id: response.id,
// service: 'stripe',
// };
// this.inProgress = false;
// this.detectChanges();
// console.log('submit event');
// this.submitted.emit();
// }
// })
// .catch(e => {
// // TODO backend should include e.param and handle errors inline
// this.error = e.message;
// console.log('catch');
// this.inProgress = false;
// this.detectChanges();
// });
// }
cancelForm
()
{
if
(
!
this
.
inProgress
)
{
this
.
showModal
=
true
;
...
...
This diff is collapsed.
src/app/modules/wallet/v2/settings-cash/settings-cash.component.ts
View file @
f8bd92e2
...
...
@@ -19,7 +19,6 @@ export class WalletSettingsCashComponent implements OnInit {
private
_cashWallet
:
WalletCurrency
;
@
Input
()
set
cashWallet
(
c
:
WalletCurrency
)
{
console
.
log
(
'
SettingsCash.ts : wallet input has been updated
'
);
this
.
_cashWallet
=
c
;
this
.
detectChanges
();
if
(
this
.
init
)
{
...
...
@@ -75,15 +74,8 @@ export class WalletSettingsCashComponent implements OnInit {
}
async
setView
()
{
console
.
log
(
'
setting cashSettings view_________
'
);
const
previousView
=
this
.
view
||
'
onboarding
'
;
// const user = this.session.getLoggedInUser();
// const hasMerchant = user && user.merchant.service === 'stripe';
// if (!hasMerchant) {
if
(
!
this
.
cashWallet
.
stripeDetails
.
hasAccount
)
{
console
.
log
(
'
view is: onboarding
'
);
this
.
view
=
'
onboarding
'
;
}
else
{
this
.
inProgress
=
true
;
...
...
@@ -93,16 +85,13 @@ export class WalletSettingsCashComponent implements OnInit {
this
.
walletService
.
getStripeAccount
()
.
then
((
account
:
any
)
=>
{
console
.
log
(
'
cashSettings getStripeAccount response
'
,
account
);
this
.
account
=
account
;
if
(
!
this
.
account
.
requirement
||
this
.
account
.
requirement
.
indexOf
(
'
external_account
'
)
>
-
1
)
{
console
.
log
(
'
view is: bank
'
);
this
.
view
=
'
bank
'
;
}
else
{
console
.
log
(
'
view is: extras
'
);
this
.
view
=
'
extras
'
;
}
...
...
@@ -111,14 +100,12 @@ export class WalletSettingsCashComponent implements OnInit {
.
catch
(
e
=>
{
this
.
error
=
e
.
message
;
this
.
view
=
'
error
'
;
console
.
log
(
'
view is: error
'
);
this
.
detectChanges
();
});
}
this
.
inProgress
=
false
;
this
.
detectChanges
();
if
(
this
.
init
&&
previousView
!==
this
.
view
&&
this
.
view
!==
'
error
'
)
{
console
.
log
(
'
**Event Emitter: accountChanged
'
);
this
.
accountChanged
.
emit
();
}
}
...
...
This diff is collapsed.
src/app/modules/wallet/v2/settings-tokens/settings-tokens.component.ts
View file @
f8bd92e2
...
...
@@ -88,11 +88,6 @@ export class WalletSettingsTokensComponent implements OnInit, OnDestroy {
}
ngOnInit
()
{
//TODOOJM remove
console
.
log
(
'
*** tksettings-- session.user.rewards:
'
,
this
.
session
.
getLoggedInUser
().
rewards
);
this
.
form
=
new
FormGroup
({
addressInput
:
new
FormControl
(
''
,
{
validators
:
[
Validators
.
required
,
this
.
validateAddressFormat
],
...
...
This diff is collapsed.
src/app/modules/wallet/v2/transactions-cash/transactions-cash.component.ts
View file @
f8bd92e2
...
...
@@ -21,7 +21,6 @@ import * as moment from 'moment';
})
export
class
WalletTransactionsCashComponent
implements
OnInit
{
@
Input
()
noAccount
:
boolean
=
false
;
@
Input
()
cashWallet
:
WalletCurrency
;
// TODOOJM USE ME
init
:
boolean
=
false
;
inProgress
:
boolean
=
true
;
...
...
This diff is collapsed.
src/app/modules/wallet/wallet.module.ts
View file @
f8bd92e2
...
...
@@ -54,6 +54,7 @@ import { FeaturesService } from '../../services/features.service';
import
{
ConfigsService
}
from
'
../../common/services/configs.service
'
;
import
{
WalletDashboardComponent
}
from
'
./v2/dashboard.component
'
;
import
{
BlockchainConsoleComponent
}
from
'
../blockchain/console/console.component
'
;
import
{
AnalyticsModule
}
from
'
../analytics/analytics.module
'
;
export
const
WALLET_ROUTES
:
Routes
=
[
{
...
...
@@ -175,6 +176,7 @@ export const WALLET_ROUTES: Routes = [
ModalsModule
,
ReferralsModule
,
WalletV2Module
,
AnalyticsModule
,
],
declarations
:
[
WalletComponent
,
...
...
This diff is collapsed.
Please
register
or
sign in
to comment