-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
US-2101 Refactor RNS registration screens for better readability and …
…remove circular dependencies (#883) * feat: __DEV__ resetApp for dev purposes if cannot login * refactor: RNS Processor to a single instance * lint: add spaces for readability, rename type * refactor: commitment logic of RnsProcessor * lint: convert fn to avoid lint error * refactor: calculateRnsDomainPrice function * refactor: formatTokenValues to accept additional resultDecimals param * refactor: make actionTitle optional in getPopupMessage * feat: add actual calculation of the price * refactor: ProfileCreateScreen and profileState functions * feat: enhance pending transaction
- Loading branch information
1 parent
cb4ce10
commit 794c2fd
Showing
28 changed files
with
646 additions
and
522 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
export * from './RnsProcessor' | ||
export * from './useRifToken' | ||
export * from './useRnsDomainPriceInRif' | ||
export * from './useProfileStatusColors' |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
import { IApiTransaction } from '@rsksmart/rif-wallet-services' | ||
import { ContractReceipt } from 'ethers' | ||
|
||
import { TransactionResponseWithoutWait } from 'screens/send/types' | ||
|
||
import { ActivityRowPresentationObject } from '../slices/transactionsSlice' | ||
|
||
export enum TransactionStatus { | ||
SUCCESS = 'SUCCESS', | ||
PENDING = 'PENDING', | ||
FAILED = 'FAILED', | ||
USER_CONFIRM = 'USER_CONFIRM', | ||
} | ||
|
||
export interface TransactionExtras { | ||
symbol?: string | ||
finalAddress?: string | ||
enhancedAmount?: string | ||
original?: TransactionResponseWithoutWait | ||
} | ||
|
||
type TransferTransactionStatus = | ||
| TransferTransactionStatusPending | ||
| TransferTransactionStatusConfirmed | ||
| TransferTransactionStatusFailed | ||
|
||
type TransferTransactionStatusPending = { | ||
txStatus: TransactionStatus.PENDING | ||
} & TransactionExtras & | ||
TransactionResponseWithoutWait | ||
|
||
type TransferTransactionStatusConfirmed = { | ||
txStatus: TransactionStatus.USER_CONFIRM | ||
original?: TransactionResponseWithoutWait | ||
} & ContractReceipt | ||
|
||
type TransferTransactionStatusFailed = { | ||
txStatus: TransactionStatus.FAILED | ||
} & TransactionResponseWithoutWait | ||
|
||
export type OnSetTransactionStatusChange = ( | ||
transaction: TransferTransactionStatus, | ||
) => void | ||
|
||
export type ApiTransactionWithExtras = IApiTransaction & TransactionExtras | ||
export type ModifyTransaction = Partial<IApiTransaction> & | ||
Pick<IApiTransaction, 'hash'> & | ||
Pick<ActivityRowPresentationObject, 'status'> |
Oops, something went wrong.