Skip to content

Commit

Permalink
minor preview 10 post cleanup (#127)
Browse files Browse the repository at this point in the history
  • Loading branch information
soulstar9792 authored Jul 20, 2023
1 parent e1cc689 commit 060a761
Show file tree
Hide file tree
Showing 10 changed files with 3,853 additions and 429 deletions.
2 changes: 1 addition & 1 deletion .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# paths = ["/path/to/override"] # path dependency overrides

[alias] # command aliases
install_soroban = "install --git https://github.com/stellar/soroban-tools --rev af4b38e8fa7f6cb027089471d0ddfbc090cbf60e --root ./target soroban-cli --debug"
install_soroban = "install --git https://github.com/stellar/soroban-tools --rev cb3c44f9d8080917a7cb019d6be25019f6cf78c3 --root ./target soroban-cli --debug"
b = "build --target wasm32-unknown-unknown --release"
# c = "check"
# t = "test"
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,7 @@ jobs:
echo 'futurenet' > .soroban-example-dapp/network
echo 'CC757WDV3G442WQCNPNOA2UEXOC7UJD5VP4BLLCRDW5LRM6UZZR6ISVU' > .soroban-example-dapp/abundance_token_id
echo 'CCHCPXECLYGX4QU34ZZOHP6C6KVAPIDTUNPIUA6GF4SP6ECFF5BX57OG' > .soroban-example-dapp/crowdfund_id
echo 'Standalone Network ; February 2017' > .soroban-example-dapp/passphrase
echo 'https://rpc-futurenet.stellar.org/' > .soroban-example-dapp/rpc-url
- run: npm ci
- run: npm run build
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ Install Dependencies
make build-docker

Building the docker image lets you avoid installing the specific version of soroban-cli in step (1), if desired.
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.

Run Backend
-----------
Expand Down
9 changes: 0 additions & 9 deletions address_workaround.js

This file was deleted.

3 changes: 1 addition & 2 deletions components/organisms/pledge/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import * as abundanceContract from 'abundance-token'

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

const Pledge: FunctionComponent = () => {
Expand Down Expand Up @@ -59,7 +58,7 @@ const Pledge: FunctionComponent = () => {

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

useSubscription(crowdfundContract, 'target_reached', React.useMemo(() => () => {
Expand Down
149 changes: 0 additions & 149 deletions convert.ts

This file was deleted.

10 changes: 8 additions & 2 deletions initialize.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,19 @@ if [[ "$SOROBAN_RPC_HOST" == "" ]]; then
# it can call the stellar standalone container just using its name "stellar"
if [[ "$IS_USING_DOCKER" == "true" ]]; then
SOROBAN_RPC_HOST="http://stellar:8000"
SOROBAN_RPC_URL="$SOROBAN_RPC_HOST"
elif [[ "$NETWORK" == "futurenet" ]]; then
SOROBAN_RPC_HOST="https://rpc-futurenet.stellar.org:443"
SOROBAN_RPC_URL="$SOROBAN_RPC_HOST"
else
# assumes standalone on quickstart, which has the soroban/rpc path
SOROBAN_RPC_HOST="http://localhost:8000"
SOROBAN_RPC_URL="$SOROBAN_RPC_HOST/soroban/rpc"
fi
else
SOROBAN_RPC_URL="$SOROBAN_RPC_HOST"
fi

SOROBAN_RPC_URL="$SOROBAN_RPC_HOST"

case "$1" in
standalone)
SOROBAN_NETWORK_PASSPHRASE="Standalone Network ; February 2017"
Expand Down Expand Up @@ -61,6 +65,8 @@ soroban config network add \
echo Add $NETWORK to .soroban-example-dapp for use with npm scripts
mkdir -p .soroban-example-dapp
echo $NETWORK > ./.soroban-example-dapp/network
echo $SOROBAN_RPC_URL > ./.soroban-example-dapp/rpc-url
echo "$SOROBAN_NETWORK_PASSPHRASE" > ./.soroban-example-dapp/passphrase

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

0 comments on commit 060a761

Please sign in to comment.