Skip to content

Commit abdac3a

Browse files
authored
minor preview 10 post cleanup (#127)
1 parent ab19ca1 commit abdac3a

File tree

10 files changed

+3853
-429
lines changed

10 files changed

+3853
-429
lines changed

.cargo/config.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# paths = ["/path/to/override"] # path dependency overrides
22

33
[alias] # command aliases
4-
install_soroban = "install --git https://github.com/stellar/soroban-tools --rev af4b38e8fa7f6cb027089471d0ddfbc090cbf60e --root ./target soroban-cli --debug"
4+
install_soroban = "install --git https://github.com/stellar/soroban-tools --rev cb3c44f9d8080917a7cb019d6be25019f6cf78c3 --root ./target soroban-cli --debug"
55
b = "build --target wasm32-unknown-unknown --release"
66
# c = "check"
77
# t = "test"

.github/workflows/nodejs.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,5 +33,7 @@ jobs:
3333
echo 'futurenet' > .soroban-example-dapp/network
3434
echo 'CC757WDV3G442WQCNPNOA2UEXOC7UJD5VP4BLLCRDW5LRM6UZZR6ISVU' > .soroban-example-dapp/abundance_token_id
3535
echo 'CCHCPXECLYGX4QU34ZZOHP6C6KVAPIDTUNPIUA6GF4SP6ECFF5BX57OG' > .soroban-example-dapp/crowdfund_id
36+
echo 'Standalone Network ; February 2017' > .soroban-example-dapp/passphrase
37+
echo 'https://rpc-futurenet.stellar.org/' > .soroban-example-dapp/rpc-url
3638
- run: npm ci
3739
- run: npm run build

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ Install Dependencies
2121
make build-docker
2222

2323
Building the docker image lets you avoid installing the specific version of soroban-cli in step (1), if desired.
24+
6. **NOTE** - Follow the instructions below for Futurenet or Standalone and ensure that you have funded your wallet address that you intend to use from browser, otherwise the dapp display will be blank and a 'Account not found' will be printed on browser's console only.
2425

2526
Run Backend
2627
-----------

address_workaround.js

Lines changed: 0 additions & 9 deletions
This file was deleted.

components/organisms/pledge/index.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ import * as abundanceContract from 'abundance-token'
1212

1313
import * as SorobanClient from 'soroban-client'
1414
import { Deposits, FormPledge } from '../../molecules'
15-
import * as convert from '../../../convert'
1615
let xdr = SorobanClient.xdr
1716

1817
const Pledge: FunctionComponent = () => {
@@ -59,7 +58,7 @@ const Pledge: FunctionComponent = () => {
5958

6059
useSubscription(crowdfundContract, 'pledged_amount_changed', React.useMemo(() => event => {
6160
let eventTokenBalance = xdr.ScVal.fromXDR(event.value.xdr, 'base64')
62-
setAbundance({ ...abundance!, balance: convert.scvalToBigInt(eventTokenBalance) })
61+
setAbundance({ ...abundance!, balance: SorobanClient.scValToNative(eventTokenBalance) })
6362
}, [abundance]))
6463

6564
useSubscription(crowdfundContract, 'target_reached', React.useMemo(() => () => {

convert.ts

Lines changed: 0 additions & 149 deletions
This file was deleted.

initialize.sh

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,19 @@ if [[ "$SOROBAN_RPC_HOST" == "" ]]; then
2525
# it can call the stellar standalone container just using its name "stellar"
2626
if [[ "$IS_USING_DOCKER" == "true" ]]; then
2727
SOROBAN_RPC_HOST="http://stellar:8000"
28+
SOROBAN_RPC_URL="$SOROBAN_RPC_HOST"
2829
elif [[ "$NETWORK" == "futurenet" ]]; then
2930
SOROBAN_RPC_HOST="https://rpc-futurenet.stellar.org:443"
31+
SOROBAN_RPC_URL="$SOROBAN_RPC_HOST"
3032
else
33+
# assumes standalone on quickstart, which has the soroban/rpc path
3134
SOROBAN_RPC_HOST="http://localhost:8000"
35+
SOROBAN_RPC_URL="$SOROBAN_RPC_HOST/soroban/rpc"
3236
fi
37+
else
38+
SOROBAN_RPC_URL="$SOROBAN_RPC_HOST"
3339
fi
3440

35-
SOROBAN_RPC_URL="$SOROBAN_RPC_HOST"
36-
3741
case "$1" in
3842
standalone)
3943
SOROBAN_NETWORK_PASSPHRASE="Standalone Network ; February 2017"
@@ -61,6 +65,8 @@ soroban config network add \
6165
echo Add $NETWORK to .soroban-example-dapp for use with npm scripts
6266
mkdir -p .soroban-example-dapp
6367
echo $NETWORK > ./.soroban-example-dapp/network
68+
echo $SOROBAN_RPC_URL > ./.soroban-example-dapp/rpc-url
69+
echo "$SOROBAN_NETWORK_PASSPHRASE" > ./.soroban-example-dapp/passphrase
6470

6571
if !(soroban config identity ls | grep token-admin 2>&1 >/dev/null); then
6672
echo Create the token-admin identity

0 commit comments

Comments
 (0)