11import LocalizedStrings from 'react-localization' ;
22import { Link } from 'react-router-dom' ;
3- import { ActionBar , Pane , Text } from '@cybercongress/gravity' ;
4-
3+ import { Pane , Text } from '@cybercongress/gravity' ;
54import { BondStatus } from 'cosmjs-types/cosmos/staking/v1beta1/staking' ;
65import { useBackend } from 'src/contexts/backend/backend' ;
76import { CHAIN_ID , BASE_DENOM } from 'src/constants/config' ;
87import { KEY_TYPE } from 'src/pages/Keys/types' ;
9-
108import { ContainetLedger } from './container' ;
119import { Dots } from '../ui/Dots' ;
1210import Account from '../account/account' ;
@@ -17,7 +15,7 @@ import { i18n } from '../../i18n/en';
1715
1816import Button from '../btnGrd' ;
1917import { InputNumber , Input } from '../Input' ;
20- import ActionBarContainer from '../actionBar' ;
18+ import ActionBar from '../actionBar' ;
2119import ButtonIcon from '../buttons/ButtonIcon' ;
2220import { Color } from '../LinearGradientContainer/LinearGradientContainer' ;
2321import AddFileButton from '../buttons/AddFile/AddFile' ;
@@ -28,12 +26,6 @@ const imgSecrets = require('../../image/secrets_icon.png');
2826
2927const T = new LocalizedStrings ( i18n ) ;
3028
31- // const toPascalCase = (str) =>
32- // str
33- // .match(/[A-Z]{2,}(?=[A-Z][a-z]+[0-9]*|\b)|[a-zA-Z0-9]+/g)
34- // .map((cht) => cht.charAt(0).toUpperCase() + cht.substr(1).toLowerCase())
35- // .join('');
36-
3729export function ActionBarContentText ( { children, ...props } ) {
3830 return (
3931 < Pane
@@ -50,54 +42,50 @@ export function ActionBarContentText({ children, ...props }) {
5042 ) ;
5143}
5244
45+ // const toPascalCase = (str) =>
46+ // str
47+ // .match(/[A-Z]{2,}(?=[A-Z][a-z]+[0-9]*|\b)|[a-zA-Z0-9]+/g)
48+ // .map((cht) => cht.charAt(0).toUpperCase() + cht.substr(1).toLowerCase())
49+ // .join('');
50+
5351export function TransactionSubmitted ( ) {
5452 return (
5553 < ActionBar >
56- < ActionBarContentText >
57- Please wait while we confirm the transaction on the blockchain{ ' ' }
58- < Dots big />
59- </ ActionBarContentText >
54+ Please wait while we confirm the transaction on the blockchain{ ' ' }
55+ < Dots big />
6056 </ ActionBar >
6157 ) ;
6258}
6359
6460export function Confirmed ( { txHash, txHeight, cosmos, onClickBtnClose } ) {
6561 return (
66- < ActionBar >
67- < ActionBarContentText display = "inline" >
68- < Pane display = "inline" > Transaction</ Pane > { ' ' }
69- { cosmos ? (
70- < LinkWindow to = { `https://www.mintscan.io/txs/${ txHash } ` } >
71- { trimString ( txHash , 6 , 6 ) }
72- </ LinkWindow >
73- ) : (
74- < Link to = { `/network/bostrom/tx/${ txHash } ` } >
75- { trimString ( txHash , 6 , 6 ) }
76- </ Link >
77- ) } { ' ' }
78- { txHeight && (
79- < Pane display = "inline" >
80- was included in the block < br /> at height{ ' ' }
81- { formatNumber ( parseFloat ( txHeight ) ) }
82- </ Pane >
83- ) }
84- </ ActionBarContentText >
85- < Button style = { { margin : '0 10px' } } onClick = { onClickBtnClose } >
86- Fuck Google
87- </ Button >
62+ < ActionBar button = { { text : ' Fuck Google' , onClick : onClickBtnClose } } >
63+ < Pane display = "inline" > Transaction</ Pane > { ' ' }
64+ { cosmos ? (
65+ < LinkWindow to = { `https://www.mintscan.io/txs/${ txHash } ` } >
66+ { trimString ( txHash , 6 , 6 ) }
67+ </ LinkWindow >
68+ ) : (
69+ < Link to = { `/network/bostrom/tx/${ txHash } ` } >
70+ { trimString ( txHash , 6 , 6 ) }
71+ </ Link >
72+ ) } { ' ' }
73+ { txHeight && (
74+ < Pane display = "inline" >
75+ was included in the block < br /> at height{ ' ' }
76+ { formatNumber ( parseFloat ( txHeight ) ) }
77+ </ Pane >
78+ ) }
8879 </ ActionBar >
8980 ) ;
9081}
9182
9283export function TransactionError ( { onClickBtn, errorMessage } ) {
9384 return (
94- < ActionBar >
95- < ActionBarContentText display = "block" >
96- Message Error: { errorMessage }
97- </ ActionBarContentText >
98- < Button style = { { margin : '0 10px' } } onClick = { onClickBtn } >
99- { T . actionBar . confirmedTX . continue }
100- </ Button >
85+ < ActionBar
86+ button = { { text : T . actionBar . confirmedTX . continue , onClick : onClickBtn } }
87+ >
88+ Message Error: { errorMessage }
10189 </ ActionBar >
10290 ) ;
10391}
@@ -118,7 +106,7 @@ export function StartStageSearchActionBar({
118106 const { isIpfsInitialized } = useBackend ( ) ;
119107 return (
120108 // use NodeIsLoadingButton component
121- < ActionBarContainer
109+ < ActionBar
122110 button = { {
123111 disabled : ! isIpfsInitialized || ! contentHash . length ,
124112 onClick : onClickBtn ,
@@ -166,7 +154,7 @@ export function StartStageSearchActionBar({
166154 />
167155 </ Pane >
168156 </ Pane >
169- </ ActionBarContainer >
157+ </ ActionBar >
170158 ) ;
171159}
172160
@@ -226,7 +214,7 @@ export function Delegate({
226214 available,
227215} ) {
228216 return (
229- < ActionBarContainer
217+ < ActionBar
230218 onClickBack = { onClickBack }
231219 button = { {
232220 text : T . actionBar . delegate . generate ,
@@ -253,7 +241,7 @@ export function Delegate({
253241 < Text marginLeft = { 10 } fontSize = "16px" color = "#fff" >
254242 { BASE_DENOM . toUpperCase ( ) }
255243 </ Text >
256- </ ActionBarContainer >
244+ </ ActionBar >
257245 ) ;
258246}
259247
@@ -270,7 +258,7 @@ export function ReDelegate({
270258 onClickBack,
271259} ) {
272260 return (
273- < ActionBarContainer
261+ < ActionBar
274262 onClickBack = { onClickBack }
275263 button = { {
276264 text : T . actionBar . delegate . generate ,
@@ -315,7 +303,7 @@ export function ReDelegate({
315303 </ option >
316304 ) ) }
317305 </ select >
318- </ ActionBarContainer >
306+ </ ActionBar >
319307 ) ;
320308}
321309
@@ -329,7 +317,7 @@ export function ActionBarSend({
329317 onClickBack,
330318} ) {
331319 return (
332- < ActionBarContainer
320+ < ActionBar
333321 onClickBack = { onClickBack }
334322 button = { {
335323 text : 'Generate Tx' ,
@@ -352,7 +340,7 @@ export function ActionBarSend({
352340 autoFocus = { false }
353341 />
354342 </ div >
355- </ ActionBarContainer >
343+ </ ActionBar >
356344 ) ;
357345}
358346
@@ -413,7 +401,7 @@ export function ConnectAddress({
413401 onClickBack,
414402} ) {
415403 return (
416- < ActionBarContainer
404+ < ActionBar
417405 button = { {
418406 disabled : ! selectNetwork || ! selectMethod ,
419407 text : selectMethod === KEY_TYPE . secrets ? 'Add' : 'Connect' ,
@@ -462,6 +450,6 @@ export function ConnectAddress({
462450 text = { CHAIN_ID }
463451 />
464452 </ Pane >
465- </ ActionBarContainer >
453+ </ ActionBar >
466454 ) ;
467455}
0 commit comments