Skip to content

Commit

Permalink
Parse seq & auto connect boolean
Browse files Browse the repository at this point in the history
  • Loading branch information
y3fers0n committed Oct 4, 2024
1 parent 6985496 commit 15adcae
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion android/lib/src/main/res/raw/trust_min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 5 additions & 2 deletions packages/ios-web3-provider/swift/TrustWeb3Provider.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,22 @@ public struct TrustWeb3Provider {
public let aptos: AptosConfig
public let ton: TonConfig
public let appVersion: String
public let autoConnect: Bool

public init(
ethereum: EthereumConfig,
solana: SolanaConfig,
aptos: AptosConfig = AptosConfig(network: "Mainnet", chainId: "1"),
ton: TonConfig,
appVersion: String
appVersion: String,
autoConnect: Bool
) {
self.ethereum = ethereum
self.solana = solana
self.aptos = aptos
self.ton = ton
self.appVersion = appVersion
self.autoConnect = autoConnect
}

public struct EthereumConfig: Equatable {
Expand Down Expand Up @@ -148,7 +151,7 @@ public struct TrustWeb3Provider {
image: 'https://assets-cdn.trustwallet.com/dapps/trust.logo.png',
about_url: 'https://trustwallet.com/about-us',
},
isWalletBrowser: true,
isWalletBrowser: \(config.autoConnect),
};
const tonBridge = trustwallet.tonBridge(walletInfo, ton);
Expand Down
4 changes: 2 additions & 2 deletions packages/ios-web3-provider/swift/trust-min.js
Git LFS file not shown
4 changes: 3 additions & 1 deletion packages/ton/MobileAdapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,13 @@ export class MobileAdapter {

case 'ton_sendTransaction':
case 'tonConnect_sendTransaction':
return this.provider.internalRequest<T>(
const res = await this.provider.internalRequest<string>(
'signTransaction',
MobileAdapter.mapToCamelCase((params as object[])[0] as ITransaction),
);

return parseInt(res, 10) as T;

case 'ton_requestAccounts': {
const res = await this.provider.internalRequest<string>(
'requestAccounts',
Expand Down

0 comments on commit 15adcae

Please sign in to comment.