Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/shiny-crabs-grin.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"create-lz-oapp": patch
---

relabel example labels for OFT and OFT (Solana)
2 changes: 1 addition & 1 deletion examples/oft-solana/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
Create your local copy of this example:

```bash
LZ_ENABLE_SOLANA_OFT_EXAMPLE=1 pnpm dlx create-lz-oapp@latest
pnpm dlx create-lz-oapp@latest
```

Specify the directory, select `OFT (Solana)` and proceed with the installation.
Expand Down
21 changes: 8 additions & 13 deletions packages/create-lz-oapp/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,16 @@ export const getExamples = (): Example[] => {
directory: 'examples/oapp',
ref,
},
{
id: 'oft-solana',
label: 'OFT - EVM, Solana',
repository,
directory: 'examples/oft-solana',
ref,
},
{
id: 'oft',
label: 'OFT',
label: 'OFT - EVM only',
repository,
directory: 'examples/oft',
ref,
Expand Down Expand Up @@ -149,18 +156,6 @@ export const getExamples = (): Example[] => {
},
]
: []),
// The Solana OFT example is feature flagged for the time being
...(process.env.LZ_ENABLE_SOLANA_OFT_EXAMPLE
? [
{
id: 'oft-solana',
label: 'OFT (Solana)',
repository,
directory: 'examples/oft-solana',
ref,
},
]
: []),
...(process.env.LZ_ENABLE_SOLANA_OAPP_EXAMPLE
? [
{
Expand Down
10 changes: 1 addition & 9 deletions packages/create-lz-oapp/test/config.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,7 @@ describe('config', () => {
examples.forEach((example) => expect(example).toMatchObject({ ref: 'ohhello' }))
})

it('should not include Solana OFT example if LZ_ENABLE_SOLANA_OFT_EXAMPLE is empty', () => {
process.env.LZ_ENABLE_SOLANA_OFT_EXAMPLE = ''

expect(getExamples()).not.toContainEqual(expect.objectContaining({ id: 'oft-solana' }))
})

it('should include Solana OFT example if LZ_ENABLE_SOLANA_OFT_EXAMPLE is defined', () => {
process.env.LZ_ENABLE_SOLANA_OFT_EXAMPLE = 'yes'

it('should include Solana OFT example', () => {
expect(getExamples()).toContainEqual(expect.objectContaining({ id: 'oft-solana' }))
})

Expand Down
2 changes: 1 addition & 1 deletion tests-user/tests/create-lz-oapp.bats
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ teardown() {
@test "should work with pnpm & oft solana example in CI mode" {
local DESTINATION="$PROJECTS_DIRECTORY/pnpm-oft-solana"

LZ_ENABLE_SOLANA_OFT_EXAMPLE=1 npx --yes create-lz-oapp --ci --example oft-solana --destination $DESTINATION --package-manager pnpm
npx --yes create-lz-oapp --ci --example oft-solana --destination $DESTINATION --package-manager pnpm
cd "$DESTINATION"
pnpm compile
pnpm test
Expand Down
1 change: 0 additions & 1 deletion turbo.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@
"LZ_ENABLE_EXPERIMENTAL_PARALLEL_EXECUTION",
"LZ_ENABLE_EXPERIMENTAL_RETRY",
"LZ_ENABLE_EXPERIMENTAL_SIMULATION",
"LZ_ENABLE_SOLANA_OFT_EXAMPLE",
"LZ_ENABLE_SOLANA_OAPP_EXAMPLE",
"LZ_ENABLE_READ_EXAMPLE",
"LZ_ENABLE_ZKSOLC_EXAMPLE",
Expand Down