Skip to content

Commit 3729968

Browse files
committed
Bug fixes
1 parent 2add651 commit 3729968

File tree

6 files changed

+24
-10
lines changed

6 files changed

+24
-10
lines changed

Diff for: package.json

+3-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"private": true,
55
"dependencies": {
66
"@reduxjs/toolkit": "^1.6.1",
7-
"@synonymdev/blocktank-client": "^0.0.44",
7+
"@synonymdev/blocktank-client": "^0.0.45",
88
"@testing-library/jest-dom": "^5.11.4",
99
"@testing-library/react": "^11.1.0",
1010
"@testing-library/user-event": "^12.1.10",
@@ -57,7 +57,8 @@
5757
"build:testnet": "REACT_APP_MAINNET=false yarn build",
5858
"build:mainnet": "REACT_APP_MAINNET=true yarn build",
5959
"deploy:testnet": "yarn build:testnet && surge ./build http://cr-98375983893.surge.sh",
60-
"deploy:mainnet": "yarn build:mainnet && surge ./build http://bt-mainnet.surge.sh"
60+
"deploy:mainnet": "yarn build:mainnet && surge ./build http://bt-mainnet.surge.sh",
61+
"deploy": "yarn deploy:testnet && yarn deploy:mainnet"
6162
},
6263
"eslintConfig": {
6364
"extends": [

Diff for: src/pages/public/configure/index.tsx

+12-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,13 @@ import { Button, Form } from 'react-bootstrap';
33
import bt, { IBuyChannelRequest, IService } from '@synonymdev/blocktank-client';
44

55
import { useAppDispatch, useAppSelector } from '../../../store/hooks';
6-
import { refreshInfo, selectInfo, selectInfoState, navigate } from '../../../store/public-store';
6+
import {
7+
refreshInfo,
8+
selectInfo,
9+
selectInfoState,
10+
navigate,
11+
refreshOrder
12+
} from '../../../store/public-store';
713
import Spinner from '../../../components/spinner';
814
import FormCard from '../../../components/form-card';
915
import './index.scss';
@@ -94,7 +100,11 @@ function ConfigurePage(): JSX.Element {
94100
const buyRes = await bt.buyChannel(req);
95101
const { order_id } = buyRes;
96102

97-
dispatch(navigate({ page: 'confirm', orderId: order_id }));
103+
dispatch(refreshOrder(order_id))
104+
.then(() => {
105+
dispatch(navigate({ page: 'confirm', orderId: order_id }));
106+
})
107+
.catch((refreshError) => alert(refreshError));
98108
} catch (error) {
99109
setIsSubmitting(false);
100110
console.log(error);

Diff for: src/pages/public/confirm/index.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ function ConfirmationPage(): JSX.Element {
9999
>
100100
<span>I accept the </span>
101101
<a target={'_blank'} className={'link'} href={'/terms-and-conditions'}>
102-
terms and conditions
102+
terms of service
103103
</a>
104104
</Checkbox>
105105
</div>

Diff for: src/pages/public/payment/index.scss

-1
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,4 @@
99
font-weight: 600;
1010
font-size: 15px;
1111
color: #F75C1A;
12-
margin-top: 20px;
1312
}

Diff for: src/utils/helpers.ts

+4
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ const orderExpiryLabels = {
3030
TimeAgo.addLabels('en', 'long', orderExpiryLabels);
3131

3232
export const clipCenter = (str: string, maxLength: number): string => {
33+
if (!str) {
34+
return '';
35+
}
36+
3337
if (str.length > maxLength) {
3438
const center = Math.round(maxLength / 2);
3539
return `${str.substr(0, center)}...${str.substr(str.length - center, str.length)}`;

Diff for: yarn.lock

+4-4
Original file line numberDiff line numberDiff line change
@@ -1768,10 +1768,10 @@
17681768
"@svgr/plugin-svgo" "^5.5.0"
17691769
loader-utils "^2.0.0"
17701770

1771-
"@synonymdev/blocktank-client@^0.0.44":
1772-
version "0.0.44"
1773-
resolved "https://registry.yarnpkg.com/@synonymdev/blocktank-client/-/blocktank-client-0.0.44.tgz#7ec49846751a31382c7033c1cf36548487022438"
1774-
integrity sha512-eehJaOzIhILqv/zbj8ImKbqQD+tEnbgHQeYeQrtGNnwMUDLXDb9zTA/9MzC/CTyJ32C9iNaS1LHmUHKu4GkTeQ==
1771+
"@synonymdev/blocktank-client@^0.0.45":
1772+
version "0.0.45"
1773+
resolved "https://registry.yarnpkg.com/@synonymdev/blocktank-client/-/blocktank-client-0.0.45.tgz#4369d4463d5831d701bd98cfa070ccf670d5713a"
1774+
integrity sha512-cASzVmT9HQA0y4+yI2Kaz24dLXk1uDjDPY2+g+cVRqOK9ZinljKtHHFUNyMwPQUpf9mi4Xo21twbGHvu3eQdAg==
17751775
dependencies:
17761776
cross-fetch "^3.1.4"
17771777
node-fetch "3.1.1"

0 commit comments

Comments
 (0)