Skip to content

Commit

Permalink
Merge pull request #5702 from leather-io/release/monday
Browse files Browse the repository at this point in the history
Release/monday
  • Loading branch information
alter-eggo authored Jul 29, 2024
2 parents e6e3d9a + 0353b33 commit 8338c67
Show file tree
Hide file tree
Showing 7 changed files with 87 additions and 50 deletions.
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -134,14 +134,14 @@
"@coinbase/cbpay-js": "2.1.0",
"@fungible-systems/zone-file": "2.0.0",
"@hirosystems/token-metadata-api-client": "1.2.0",
"@leather.io/bitcoin": "0.9.1",
"@leather.io/bitcoin": "0.10.0",
"@leather.io/constants": "0.8.2",
"@leather.io/crypto": "1.0.4",
"@leather.io/crypto": "1.1.0",
"@leather.io/models": "0.10.2",
"@leather.io/query": "2.0.1",
"@leather.io/query": "2.1.0",
"@leather.io/tokens": "0.7.0",
"@leather.io/ui": "1.8.0",
"@leather.io/utils": "0.10.2",
"@leather.io/ui": "1.9.0",
"@leather.io/utils": "0.11.0",
"@ledgerhq/hw-transport-webusb": "6.27.19",
"@noble/hashes": "1.4.0",
"@noble/secp256k1": "2.1.0",
Expand Down Expand Up @@ -252,7 +252,7 @@
"@leather.io/eslint-config": "0.6.1",
"@leather.io/panda-preset": "0.3.4",
"@leather.io/prettier-config": "0.5.0",
"@leather.io/rpc": "2.0.2",
"@leather.io/rpc": "2.1.1",
"@ls-lint/ls-lint": "2.2.3",
"@mdx-js/loader": "3.0.0",
"@pandacss/dev": "0.40.1",
Expand Down
76 changes: 39 additions & 37 deletions pnpm-lock.yaml

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

3 changes: 2 additions & 1 deletion src/app/pages/rpc-get-addresses/use-request-accounts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ export function useGetAddresses() {
if (stacksAccount) {
const stacksAddressResponse = {
symbol: 'STX',
address: stacksAccount?.address ?? '',
address: stacksAccount.address ?? '',
publicKey: stacksAccount.stxPublicKey ?? '',
};

keysToIncludeInResponse.push(stacksAddressResponse);
Expand Down
29 changes: 26 additions & 3 deletions src/app/pages/send/broadcast-error/broadcast-error.tsx
Original file line number Diff line number Diff line change
@@ -1,23 +1,32 @@
import { useLocation } from 'react-router-dom';
import { useLocation, useNavigate } from 'react-router-dom';

import get from 'lodash.get';

import { Dialog } from '@leather.io/ui';

import { RouteUrls } from '@shared/route-urls';
import { analytics } from '@shared/utils/analytics';

import { useOnMount } from '@app/common/hooks/use-on-mount';
import { DialogHeader } from '@app/ui/components/containers/headers/dialog-header';

import { BroadcastErrorLayout } from './components/broadcast-error.layout';

export function BroadcastError() {
interface Props {
showInDialog?: boolean;
}

export function BroadcastError({ showInDialog = false }: Props) {
const { state } = useLocation();
const navigate = useNavigate();

const msg = get(state, 'error.message', 'Unknown error response');
const title = get(state, 'title', 'There was an error broadcasting your transaction');
const body = get(state, 'body', 'Unable to broadcast transaction');

useOnMount(() => void analytics.track('bitcoin_contract_error', { msg }));

return (
const layout = (
<BroadcastErrorLayout
my="space.05"
textAlign="center"
Expand All @@ -26,4 +35,18 @@ export function BroadcastError() {
body={body}
/>
);

if (showInDialog) {
return (
<Dialog
header={<DialogHeader title="Error" />}
isShowing
onClose={() => navigate(RouteUrls.Home)}
>
{layout}
</Dialog>
);
}

return layout;
}
2 changes: 1 addition & 1 deletion src/app/pages/send/ordinal-inscription/ordinal-routes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ export const sendOrdinalRoutes = (
<Route path={RouteUrls.SendOrdinalInscriptionReview} element={<SendInscriptionReview />} />

<Route path={RouteUrls.SendOrdinalInscriptionSent} element={<SendInscriptionSummary />} />
<Route path={RouteUrls.SendOrdinalInscriptionError} element={<BroadcastError />} />
<Route path={RouteUrls.SendOrdinalInscriptionError} element={<BroadcastError showInDialog />} />
</Route>
);
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,12 @@ export function SendInscriptionReview() {
<Card
footer={
<Footer variant="card">
<Button aria-busy={isBroadcasting} onClick={sendInscription}>
<Button
variant="solid"
disabled={isBroadcasting}
aria-busy={isBroadcasting}
onClick={sendInscription}
>
Confirm and send transaction
</Button>
</Footer>
Expand Down
8 changes: 7 additions & 1 deletion tests/specs/rpc-get-addresses/get-addresses.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,13 @@ function getExpectedResponseForKeys(keys: SupportedBlockchains[]) {
derivationPath: "m/86'/0'/0'/0/0",
},
];
const stacksKeys = [{ symbol: 'STX', address: 'SPS8CKF63P16J28AYF7PXW9E5AACH0NZNTEFWSFE' }];
const stacksKeys = [
{
symbol: 'STX',
publicKey: '0329b076bc20f7b1592b2a1a5cb91dfefe8c966e50e256458e23dd2c5d63f8f1af',
address: 'SPS8CKF63P16J28AYF7PXW9E5AACH0NZNTEFWSFE',
},
];
return {
jsonrpc: '2.0',
result: {
Expand Down

0 comments on commit 8338c67

Please sign in to comment.