Skip to content
This repository was archived by the owner on Feb 12, 2026. It is now read-only.

Commit 4ce7b9e

Browse files
committed
fix: disable string buffer-layout field type till it is better developed
1 parent b35151c commit 4ce7b9e

4 files changed

Lines changed: 13 additions & 5 deletions

File tree

src/coders/borsh.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@ export class BorshCoder implements Coder {
1818
return acc;
1919
}, {} as Record<string, any>);
2020

21-
const buffer = Buffer.alloc(layout.span);
21+
// TODO this is how Anchor does it atm https://github.com/coral-xyz/anchor/blob/5a025b949e67bf424a30641028973f00325b8f1e/ts/packages/anchor/src/coder/borsh/accounts.ts#L46
22+
// const buffer = Buffer.alloc(layout.span);
23+
const buffer = Buffer.alloc(1000);
2224
layout.encode(values, buffer);
2325
return buffer;
2426
}

src/components/ShareModal.tsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { CheckIcon, CopyIcon, DownloadIcon } from "@chakra-ui/icons";
22
import {
33
Alert,
44
AlertDescription,
5+
AlertIcon,
56
Box,
67
Button,
78
Center,
@@ -126,8 +127,12 @@ export const ShareModal: React.FC = () => {
126127
</UnorderedList>
127128
</Text>
128129
</Box>
129-
<Alert status="info" variant="left-accent">
130-
<AlertDescription>More share options coming soon!</AlertDescription>
130+
<Alert fontSize="sm" status="warning" variant="left-accent">
131+
<AlertIcon />
132+
<AlertDescription>
133+
During the Alpha phase of development, backward-compatibility is
134+
NOT guaranteed.
135+
</AlertDescription>
131136
</Alert>
132137
</ModalBody>
133138

src/utils/internal.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export const newRpcEndpoint = (): IRpcEndpoint => ({
2626
export const newDataField = (): IInstrctionDataField => ({
2727
id: uuid(),
2828
name: "",
29-
type: "string",
29+
type: "u8",
3030
value: "",
3131
});
3232

src/utils/ui-constants.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,8 @@ export const FORMAT_DATA_TYPES: Record<DataFormat, InstructionDataFieldType[]> =
6060
"bool",
6161
"bytes",
6262
"publicKey",
63-
"string",
63+
// TODO underbaked - needs to support various types of String encodings
64+
// "string",
6465
"unsupported",
6566
],
6667
raw: [],

0 commit comments

Comments
 (0)