Skip to content

Commit 1eb6e36

Browse files
ElliotFriendclaude
andauthored
chore: fix JS SDK default import for @stellar/stellar-sdk v16.0.0 (#2521)
js-stellar-sdk v16.0.0 removed the ESM default export (and merged @stellar/stellar-base into @stellar/stellar-sdk). The string-to-ScVal example used `import StellarSdk from "@stellar/stellar-sdk"`, which no longer works. Switch to a namespace import (`import * as StellarSdk`) to preserve the `StellarSdk.xdr.ScVal` body unchanged. Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent bcb3d75 commit 1eb6e36

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

docs/build/guides/conversions/string-conversions.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ pub fn string_to_val(string: String) -> Val {
9090
```
9191

9292
```js
93-
import StellarSdk from "@stellar/stellar-sdk";
93+
import * as StellarSdk from "@stellar/stellar-sdk";
9494

9595
// Example string value
9696
const stringValue = "Hello, Stellar!";

0 commit comments

Comments
 (0)