Skip to content

Feature/wal 449 smart contracts continued - #644

Merged
piyalbasu merged 24 commits into
release/2.6.0from
feature/WAL-449-smart-contracts-continued
Oct 6, 2022
Merged

piyalbasu merged 24 commits into
release/2.6.0from
feature/WAL-449-smart-contracts-continued

Conversation

@piyalbasu

@piyalbasu piyalbasu commented Oct 6, 2022 •

Copy link
Copy Markdown
Contributor

The main purpose of this PR is to allow Freighter to interact with Horizon instances that are being run locally. To allow that we need to:

  1. enable allowHttp in Stellar/Soroban SDK, when necessary
  2. allow users to add custom networks with an http url
  3. pass a custom network passphrase to the Sign XDR function

Screen Shot 2022-10-06 at 4 16 58 PM

piyalbasu and others added 7 commits September 29, 2022 21:34
* add a first pass at Experimental Mode and SC parsing

* better var naming

* Add translations

* use the right SDK when retrieving sourceKeys

* use correct SDK for network

* rm unused import

* rm console

Co-authored-by: GitHub Action <action@github.com>
…WAL-449-smart-contracts-continued

# Conflicts:
#	extension/src/popup/components/signTransaction/Operations/index.tsx
#	extension/src/popup/components/signTransaction/Operations/styles.scss
#	extension/src/popup/views/SignTransaction/index.tsx
Comment thread @shared/api/external.ts Outdated
@github-actions

github-actions Bot commented Oct 6, 2022

Copy link
Copy Markdown
Contributor

{...field}
/>
)}
</Field>

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

when a user adds a custom network, let them explicitly allow a HTTP network url

const isSubmitDisabled = isMemoRequired || isMalicious;

if (_networkPassphrase === networkPassphrase) {
if (_networkPassphrase !== networkPassphrase) {

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

accidentally undid this in my last commit 😬

@github-actions

github-actions Bot commented Oct 6, 2022

Copy link
Copy Markdown
Contributor

import { StellarTomlResolver } from "stellar-sdk";

import { sendMessageToBackground } from "./extensionMessaging";
import { stellarSdkServer } from "./stellarSdkServer";

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the bulk of this PR is this type of change: swapping out the standard Stellar SDK server for one that automatically configures allowHttp, which is needed for users running Horizon locally

Comment thread docs/docs/playground/components/GetNetworkDemo.tsx Outdated
@github-actions

github-actions Bot commented Oct 6, 2022

Copy link
Copy Markdown
Contributor

const transaction = SDK.TransactionBuilder.fromXDR(
transactionXdr,
SDK.Networks[network],
networkPassphrase || SDK.Networks[network],

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

allow a user to use a custom passphrase not associated with a network. Needed when a user generates a random passphrase with Stellar Quickstart

@github-actions

github-actions Bot commented Oct 6, 2022

Copy link
Copy Markdown
Contributor

@github-actions

github-actions Bot commented Oct 6, 2022

Copy link
Copy Markdown
Contributor

1 similar comment
@github-actions

github-actions Bot commented Oct 6, 2022

Copy link
Copy Markdown
Contributor

@github-actions

github-actions Bot commented Oct 6, 2022

Copy link
Copy Markdown
Contributor

@piyalbasu
piyalbasu requested a review from quietbits October 6, 2022 20:37
@piyalbasu
piyalbasu merged commit 15117a4 into release/2.6.0 Oct 6, 2022
@piyalbasu
piyalbasu deleted the feature/WAL-449-smart-contracts-continued branch October 6, 2022 20:59
piyalbasu added a commit that referenced this pull request Oct 11, 2022
* Feature/wal 449 smart contracts continued (#644)

* add a first pass at Experimental Mode and SC parsing (#636)

* add a first pass at Experimental Mode and SC parsing

* better var naming

* Add translations

* use the right SDK when retrieving sourceKeys

* use correct SDK for network

* rm unused import

* rm console

Co-authored-by: GitHub Action <action@github.com>

* allow custom networks and passphrase param

* allow connection to http servers; allow custom passphrases in freighter-api

* Add translations

* better naming

* missed one spot

* add better API for for stellar sdk server

* add different method for network details

* rollback getNetworkDetails changes for next pr

* roll back ver change

* Add translations

* add simplebar to Network Form

Co-authored-by: GitHub Action <action@github.com>

* polish styles for Smart Contract screens (#647)

* polish styles for Smart Contract screens

* Add translations

Co-authored-by: GitHub Action <action@github.com>

* add requestNetworkDetails and update docs (#646)

* add requestNetworkDetails and update docs

* Add translations

Co-authored-by: GitHub Action <action@github.com>

* copy change (#648)

* copy change

* Add translations

Co-authored-by: GitHub Action <action@github.com>

Co-authored-by: GitHub Action <action@github.com>
@piyalbasu
piyalbasu restored the feature/WAL-449-smart-contracts-continued branch March 22, 2023 18:58
@piyalbasu
piyalbasu deleted the feature/WAL-449-smart-contracts-continued branch March 22, 2023 19:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants