@hot-labs/kit 1.0.48 → 1.0.51
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/HotConnector.d.ts +0 -2
- package/build/HotConnector.js +4 -5
- package/build/HotConnector.js.map +1 -1
- package/build/OmniWallet.d.ts +3 -18
- package/build/OmniWallet.js +8 -3
- package/build/OmniWallet.js.map +1 -1
- package/build/core/Intents.d.ts +1 -6
- package/build/core/api.d.ts +5 -6
- package/build/core/api.js +15 -11
- package/build/core/api.js.map +1 -1
- package/build/core/token.js +6 -2
- package/build/core/token.js.map +1 -1
- package/build/core/types.d.ts +4 -3
- package/build/cosmos/connector.d.ts +1 -1
- package/build/cosmos/connector.js +3 -2
- package/build/cosmos/connector.js.map +1 -1
- package/build/cosmos/wallet.d.ts +3 -3
- package/build/cosmos/wallet.js +0 -3
- package/build/cosmos/wallet.js.map +1 -1
- package/build/evm/wallet.d.ts +2 -8
- package/build/evm/wallet.js +3 -14
- package/build/evm/wallet.js.map +1 -1
- package/build/exchange.js +4 -3
- package/build/exchange.js.map +1 -1
- package/build/near/connector.js +1 -1
- package/build/near/connector.js.map +1 -1
- package/build/near/wallet.d.ts +2 -9
- package/build/near/wallet.js +3 -20
- package/build/near/wallet.js.map +1 -1
- package/build/solana/wallet.d.ts +3 -9
- package/build/solana/wallet.js +23 -28
- package/build/solana/wallet.js.map +1 -1
- package/build/stellar/wallet.d.ts +2 -8
- package/build/stellar/wallet.js +0 -12
- package/build/stellar/wallet.js.map +1 -1
- package/build/ton/connector.js +6 -14
- package/build/ton/connector.js.map +1 -1
- package/build/ton/wallet.d.ts +0 -15
- package/build/ton/wallet.js +0 -15
- package/build/ton/wallet.js.map +1 -1
- package/build/ui/payment/Bridge.js +7 -1
- package/build/ui/payment/Bridge.js.map +1 -1
- package/package.json +1 -1
- package/skill.md +2 -7
- package/src/HotConnector.ts +4 -5
- package/src/OmniWallet.ts +10 -23
- package/src/core/api.ts +19 -13
- package/src/core/token.ts +7 -2
- package/src/core/types.ts +4 -3
- package/src/cosmos/connector.ts +4 -3
- package/src/cosmos/wallet.ts +3 -6
- package/src/evm/wallet.ts +5 -17
- package/src/exchange.ts +6 -6
- package/src/near/connector.ts +1 -1
- package/src/near/wallet.ts +4 -22
- package/src/solana/wallet.ts +28 -31
- package/src/stellar/wallet.ts +2 -15
- package/src/ton/connector.ts +6 -14
- package/src/ton/wallet.ts +0 -17
- package/src/ui/payment/Bridge.tsx +6 -1
package/src/near/wallet.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { NearWalletBase, SignMessageParams, SignedMessage, SignAndSendTransactionParams } from "@hot-labs/near-connect";
|
|
2
|
-
import { base64, base58
|
|
2
|
+
import { base64, base58 } from "@scure/base";
|
|
3
3
|
import { Action } from "@near-js/transactions";
|
|
4
4
|
|
|
5
5
|
import { OmniConnector } from "../OmniConnector";
|
|
@@ -8,6 +8,7 @@ import { WalletType } from "../core/chains";
|
|
|
8
8
|
import { ReviewFee } from "../core/bridge";
|
|
9
9
|
import { rpc, TGAS } from "../core/nearRpc";
|
|
10
10
|
import { Token } from "../core/token";
|
|
11
|
+
import { Commitment } from "../core";
|
|
11
12
|
|
|
12
13
|
export default class NearWallet extends OmniWallet {
|
|
13
14
|
readonly type = WalletType.NEAR;
|
|
@@ -102,6 +103,7 @@ export default class NearWallet extends OmniWallet {
|
|
|
102
103
|
}
|
|
103
104
|
|
|
104
105
|
async needRegisterToken(token: string, address: string): Promise<boolean> {
|
|
106
|
+
if (token === "native") return false;
|
|
105
107
|
const storage = await rpc.viewMethod({ contractId: token, methodName: "storage_balance_of", args: { account_id: address } }).catch(() => null);
|
|
106
108
|
return storage == null;
|
|
107
109
|
}
|
|
@@ -188,27 +190,7 @@ export default class NearWallet extends OmniWallet {
|
|
|
188
190
|
return await this.sendTransaction({ receiverId: args.token.address, actions });
|
|
189
191
|
}
|
|
190
192
|
|
|
191
|
-
async
|
|
192
|
-
if (!this.wallet) throw "not impl";
|
|
193
|
-
const accounts = await this.wallet.getAccounts();
|
|
194
|
-
if (accounts.length === 0) throw new Error("No account found");
|
|
195
|
-
const { accountId, publicKey } = accounts[0];
|
|
196
|
-
|
|
197
|
-
const seed = hex.encode(window.crypto.getRandomValues(new Uint8Array(32)));
|
|
198
|
-
const msgBuffer = new TextEncoder().encode(`${domain}_${seed}`);
|
|
199
|
-
const nonce = await window.crypto.subtle.digest("SHA-256", new Uint8Array(msgBuffer));
|
|
200
|
-
|
|
201
|
-
return {
|
|
202
|
-
signed: await this.signIntents(intents || [], { nonce: new Uint8Array(nonce) }),
|
|
203
|
-
chainId: WalletType.NEAR,
|
|
204
|
-
publicKey: publicKey,
|
|
205
|
-
address: accountId,
|
|
206
|
-
domain,
|
|
207
|
-
seed,
|
|
208
|
-
};
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
async signIntents(intents: Record<string, any>[], options?: { nonce?: Uint8Array; deadline?: number }): Promise<Record<string, any>> {
|
|
193
|
+
async signIntents(intents: Record<string, any>[], options?: { nonce?: Uint8Array; deadline?: number }): Promise<Commitment> {
|
|
212
194
|
if (!this.wallet) throw "not impl";
|
|
213
195
|
|
|
214
196
|
const nonce = new Uint8Array(options?.nonce || window.crypto.getRandomValues(new Uint8Array(32)));
|
package/src/solana/wallet.ts
CHANGED
|
@@ -20,17 +20,21 @@ import { OmniWallet } from "../OmniWallet";
|
|
|
20
20
|
import { Token } from "../core/token";
|
|
21
21
|
import { formatter } from "../core/utils";
|
|
22
22
|
import { ReviewFee } from "../core/bridge";
|
|
23
|
+
import { Commitment } from "../core";
|
|
24
|
+
import { api } from "../core/api";
|
|
23
25
|
|
|
24
26
|
import { ISolanaProtocolWallet } from "./protocol";
|
|
25
27
|
|
|
26
28
|
class SolanaWallet extends OmniWallet {
|
|
27
29
|
readonly type = WalletType.SOLANA;
|
|
28
|
-
readonly connection: Connection;
|
|
29
30
|
|
|
30
31
|
constructor(readonly connector: OmniConnector, readonly wallet: ISolanaProtocolWallet) {
|
|
31
32
|
super(connector);
|
|
32
|
-
|
|
33
|
-
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
getConnection() {
|
|
36
|
+
return new Connection(api.getRpcUrl(Network.Solana), {
|
|
37
|
+
httpHeaders: { "Api-Key": api.apiKey },
|
|
34
38
|
});
|
|
35
39
|
}
|
|
36
40
|
|
|
@@ -47,13 +51,15 @@ class SolanaWallet extends OmniWallet {
|
|
|
47
51
|
}
|
|
48
52
|
|
|
49
53
|
async fetchBalance(_: number, address: string) {
|
|
54
|
+
const connection = this.getConnection();
|
|
55
|
+
|
|
50
56
|
if (address === "native") {
|
|
51
|
-
const balance = await
|
|
57
|
+
const balance = await connection.getBalance(new PublicKey(this.address));
|
|
52
58
|
return BigInt(balance);
|
|
53
59
|
}
|
|
54
60
|
|
|
55
61
|
const ATA = getAssociatedTokenAddressSync(new PublicKey(address), new PublicKey(this.address));
|
|
56
|
-
const meta = await
|
|
62
|
+
const meta = await connection.getTokenAccountBalance(ATA);
|
|
57
63
|
return BigInt(meta.value.amount);
|
|
58
64
|
}
|
|
59
65
|
|
|
@@ -62,25 +68,12 @@ class SolanaWallet extends OmniWallet {
|
|
|
62
68
|
super.disconnect();
|
|
63
69
|
}
|
|
64
70
|
|
|
65
|
-
async signIntentsWithAuth(domain: string, intents?: Record<string, any>[]) {
|
|
66
|
-
const seed = hex.encode(window.crypto.getRandomValues(new Uint8Array(32)));
|
|
67
|
-
const msgBuffer = new TextEncoder().encode(`${domain}_${seed}`);
|
|
68
|
-
const nonce = await window.crypto.subtle.digest("SHA-256", new Uint8Array(msgBuffer));
|
|
69
|
-
|
|
70
|
-
return {
|
|
71
|
-
signed: await this.signIntents(intents || [], { nonce: new Uint8Array(nonce) }),
|
|
72
|
-
publicKey: `ed25519:${this.address}`,
|
|
73
|
-
chainId: WalletType.SOLANA,
|
|
74
|
-
address: this.address,
|
|
75
|
-
seed,
|
|
76
|
-
};
|
|
77
|
-
}
|
|
78
|
-
|
|
79
71
|
async buildTranferInstructions(token: Token, amount: bigint, receiver: string, fee: ReviewFee) {
|
|
80
72
|
const destination = new PublicKey(receiver);
|
|
81
73
|
const owner = new PublicKey(this.address);
|
|
74
|
+
const connection = this.getConnection();
|
|
82
75
|
|
|
83
|
-
const reserve = await
|
|
76
|
+
const reserve = await connection.getMinimumBalanceForRentExemption(0);
|
|
84
77
|
let additionalFee = 0n;
|
|
85
78
|
|
|
86
79
|
if (token.address === "native") {
|
|
@@ -96,7 +89,7 @@ class SolanaWallet extends OmniWallet {
|
|
|
96
89
|
}
|
|
97
90
|
|
|
98
91
|
const mint = new PublicKey(token.address);
|
|
99
|
-
const mintAccount = await
|
|
92
|
+
const mintAccount = await connection.getAccountInfo(mint);
|
|
100
93
|
const tokenProgramId = mintAccount?.owner.equals(TOKEN_2022_PROGRAM_ID) ? TOKEN_2022_PROGRAM_ID : TOKEN_PROGRAM_ID;
|
|
101
94
|
|
|
102
95
|
const tokenFrom = getAssociatedTokenAddressSync(mint, owner, false, tokenProgramId);
|
|
@@ -104,11 +97,11 @@ class SolanaWallet extends OmniWallet {
|
|
|
104
97
|
|
|
105
98
|
const instructions: TransactionInstruction[] = [ComputeBudgetProgram.setComputeUnitPrice({ microLamports: Number(fee.baseFee) }), ComputeBudgetProgram.setComputeUnitLimit({ units: Number(fee.gasLimit) })];
|
|
106
99
|
|
|
107
|
-
const isRegistered = await getAccount(
|
|
100
|
+
const isRegistered = await getAccount(connection, tokenTo, "confirmed", tokenProgramId).catch(() => null);
|
|
108
101
|
if (isRegistered == null) {
|
|
109
102
|
const inst = createAssociatedTokenAccountInstruction(new PublicKey(this.address), tokenTo, destination, mint, tokenProgramId, ASSOCIATED_TOKEN_PROGRAM_ID);
|
|
110
103
|
instructions.push(inst);
|
|
111
|
-
additionalFee += BigInt(await getMinimumBalanceForRentExemptAccount(
|
|
104
|
+
additionalFee += BigInt(await getMinimumBalanceForRentExemptAccount(connection));
|
|
112
105
|
}
|
|
113
106
|
|
|
114
107
|
if (tokenProgramId === TOKEN_2022_PROGRAM_ID) {
|
|
@@ -121,7 +114,8 @@ class SolanaWallet extends OmniWallet {
|
|
|
121
114
|
}
|
|
122
115
|
|
|
123
116
|
async transferFee(token: Token, receiver: string): Promise<ReviewFee> {
|
|
124
|
-
const
|
|
117
|
+
const connection = this.getConnection();
|
|
118
|
+
const { blockhash } = await connection.getLatestBlockhash();
|
|
125
119
|
const fee = new ReviewFee({ chain: Network.Solana, gasLimit: 1_400_000n, baseFee: 100n });
|
|
126
120
|
const { instructions, additionalFee, reserve } = await this.buildTranferInstructions(token, 1n, receiver, fee);
|
|
127
121
|
|
|
@@ -134,10 +128,10 @@ class SolanaWallet extends OmniWallet {
|
|
|
134
128
|
});
|
|
135
129
|
|
|
136
130
|
if (priorityFeeData?.priorityFeeLevels == null) throw "Failed to fetch gas";
|
|
137
|
-
const simulate = await
|
|
131
|
+
const simulate = await connection.simulateTransaction(tx).catch(() => null);
|
|
138
132
|
const unitsConsumed = formatter.bigIntMax(BigInt(simulate?.value.unitsConsumed || 10_000n), 10_000n);
|
|
139
133
|
|
|
140
|
-
const msgFee = await
|
|
134
|
+
const msgFee = await connection.getFeeForMessage(msgForEstimate);
|
|
141
135
|
const medium = BigInt(priorityFeeData.priorityFeeLevels.medium);
|
|
142
136
|
const high = BigInt(priorityFeeData.priorityFeeLevels.high);
|
|
143
137
|
const veryHigh = BigInt(priorityFeeData.priorityFeeLevels.veryHigh);
|
|
@@ -158,7 +152,7 @@ class SolanaWallet extends OmniWallet {
|
|
|
158
152
|
}
|
|
159
153
|
|
|
160
154
|
async getPriorityFeeEstimate(params: any): Promise<any> {
|
|
161
|
-
const response = await fetch("
|
|
155
|
+
const response = await fetch(api.baseUrl + "/api/v1/wibe3/helius/staked", {
|
|
162
156
|
body: JSON.stringify({ jsonrpc: "2.0", id: "helius-sdk", method: "getPriorityFeeEstimate", params: [params] }),
|
|
163
157
|
headers: { "Content-Type": "application/json" },
|
|
164
158
|
method: "POST",
|
|
@@ -178,20 +172,23 @@ class SolanaWallet extends OmniWallet {
|
|
|
178
172
|
|
|
179
173
|
async sendTransaction(instructions: TransactionInstruction[]): Promise<string> {
|
|
180
174
|
if (!this.wallet.sendTransaction) throw "not impl";
|
|
181
|
-
const
|
|
175
|
+
const connection = this.getConnection();
|
|
176
|
+
const { blockhash } = await connection.getLatestBlockhash();
|
|
182
177
|
const message = new TransactionMessage({ payerKey: new PublicKey(this.address), recentBlockhash: blockhash, instructions });
|
|
183
178
|
const transaction = new VersionedTransaction(message.compileToV0Message());
|
|
184
|
-
return await this.wallet.sendTransaction(transaction,
|
|
179
|
+
return await this.wallet.sendTransaction(transaction, connection, { preflightCommitment: "confirmed" });
|
|
185
180
|
}
|
|
186
181
|
|
|
187
182
|
async fetchBalances(chain: number, whitelist: string[]): Promise<Record<string, bigint>> {
|
|
188
183
|
const native = await this.fetchBalance(chain, "native");
|
|
184
|
+
const connection = this.getConnection();
|
|
185
|
+
|
|
189
186
|
try {
|
|
190
187
|
const res = await fetch(`https://api0.herewallet.app/api/v1/user/balances/${chain}/${this.address}`, { body: JSON.stringify({ whitelist }), method: "POST" });
|
|
191
188
|
const { balances } = await res.json();
|
|
192
189
|
return { ...balances, native };
|
|
193
190
|
} catch {
|
|
194
|
-
const tokenAccounts = await
|
|
191
|
+
const tokenAccounts = await connection.getParsedTokenAccountsByOwner(new PublicKey(this.address), { programId: TOKEN_PROGRAM_ID });
|
|
195
192
|
const balances = Object.fromEntries(
|
|
196
193
|
tokenAccounts.value.map((account) => {
|
|
197
194
|
const { mint, tokenAmount } = account.account.data.parsed.info;
|
|
@@ -208,7 +205,7 @@ class SolanaWallet extends OmniWallet {
|
|
|
208
205
|
return this.wallet.signMessage(message);
|
|
209
206
|
}
|
|
210
207
|
|
|
211
|
-
async signIntents(intents: Record<string, any>[], options?: { deadline?: number; nonce?: Uint8Array }): Promise<
|
|
208
|
+
async signIntents(intents: Record<string, any>[], options?: { deadline?: number; nonce?: Uint8Array }): Promise<Commitment> {
|
|
212
209
|
const nonce = new Uint8Array(options?.nonce || window.crypto.getRandomValues(new Uint8Array(32)));
|
|
213
210
|
|
|
214
211
|
const message = JSON.stringify({
|
package/src/stellar/wallet.ts
CHANGED
|
@@ -9,6 +9,7 @@ import { ReviewFee } from "../core/bridge";
|
|
|
9
9
|
import { formatter } from "../core/utils";
|
|
10
10
|
import { Network } from "../core/chains";
|
|
11
11
|
import { Token } from "../core/token";
|
|
12
|
+
import { Commitment } from "../core";
|
|
12
13
|
|
|
13
14
|
interface ProtocolWallet {
|
|
14
15
|
signTransaction?: (transaction: Transaction) => Promise<{ signedTxXdr: string }>;
|
|
@@ -149,20 +150,6 @@ class StellarWallet extends OmniWallet {
|
|
|
149
150
|
return this.sendTransaction(tx);
|
|
150
151
|
}
|
|
151
152
|
|
|
152
|
-
async signIntentsWithAuth(domain: string, intents?: Record<string, any>[]) {
|
|
153
|
-
const seed = hex.encode(window.crypto.getRandomValues(new Uint8Array(32)));
|
|
154
|
-
const msgBuffer = new TextEncoder().encode(`${domain}_${seed}`);
|
|
155
|
-
const nonce = await window.crypto.subtle.digest("SHA-256", new Uint8Array(msgBuffer));
|
|
156
|
-
|
|
157
|
-
return {
|
|
158
|
-
signed: await this.signIntents(intents || [], { nonce: new Uint8Array(nonce) }),
|
|
159
|
-
publicKey: `ed25519:${this.publicKey}`,
|
|
160
|
-
chainId: WalletType.STELLAR,
|
|
161
|
-
address: this.address,
|
|
162
|
-
seed,
|
|
163
|
-
};
|
|
164
|
-
}
|
|
165
|
-
|
|
166
153
|
async sendTransaction(transaction: Transaction) {
|
|
167
154
|
if (!this.wallet.signTransaction) throw "not impl";
|
|
168
155
|
const result = await this.wallet.signTransaction(transaction);
|
|
@@ -176,7 +163,7 @@ class StellarWallet extends OmniWallet {
|
|
|
176
163
|
return await this.wallet.signMessage(message);
|
|
177
164
|
}
|
|
178
165
|
|
|
179
|
-
async signIntents(intents: Record<string, any>[], options?: { deadline?: number; nonce?: Uint8Array }): Promise<
|
|
166
|
+
async signIntents(intents: Record<string, any>[], options?: { deadline?: number; nonce?: Uint8Array }): Promise<Commitment> {
|
|
180
167
|
const nonce = new Uint8Array(options?.nonce || window.crypto.getRandomValues(new Uint8Array(32)));
|
|
181
168
|
|
|
182
169
|
const message = JSON.stringify({
|
package/src/ton/connector.ts
CHANGED
|
@@ -14,28 +14,19 @@ export interface TonConnectorOptions {
|
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
const hotWallet = {
|
|
17
|
-
app_name: "hot",
|
|
18
17
|
name: "HOT",
|
|
18
|
+
app_name: "hot",
|
|
19
19
|
image: "https://raw.githubusercontent.com/hot-dao/media/main/logo.png",
|
|
20
20
|
about_url: "https://hot-labs.org/",
|
|
21
21
|
universal_url: "https://t.me/herewalletbot?attach=wallet",
|
|
22
22
|
bridge: [
|
|
23
|
-
{
|
|
24
|
-
|
|
25
|
-
url: "https://sse-bridge.hot-labs.org",
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
type: "js",
|
|
29
|
-
key: "hotWallet",
|
|
30
|
-
},
|
|
23
|
+
{ type: "sse", url: "https://sse-bridge.hot-labs.org" },
|
|
24
|
+
{ type: "js", key: "hotWallet" },
|
|
31
25
|
],
|
|
32
26
|
platforms: ["ios", "android", "chrome", "firefox", "macos", "windows", "linux"],
|
|
33
27
|
features: [
|
|
34
|
-
{
|
|
35
|
-
|
|
36
|
-
maxMessages: 4,
|
|
37
|
-
extraCurrencySupported: false,
|
|
38
|
-
},
|
|
28
|
+
{ name: "SendTransaction", maxMessages: 4, extraCurrencySupported: false },
|
|
29
|
+
{ name: "SignData", types: ["text", "binary", "cell"] },
|
|
39
30
|
],
|
|
40
31
|
};
|
|
41
32
|
|
|
@@ -69,6 +60,7 @@ class TonConnector extends OmniConnector<TonWallet> {
|
|
|
69
60
|
connector: new TonConnect({
|
|
70
61
|
walletsListSource: url,
|
|
71
62
|
manifestUrl: this.args?.tonManifestUrl,
|
|
63
|
+
walletsRequiredFeatures: { signData: { types: ["text"] } },
|
|
72
64
|
}),
|
|
73
65
|
});
|
|
74
66
|
|
package/src/ton/wallet.ts
CHANGED
|
@@ -136,23 +136,6 @@ class TonWallet extends OmniWallet {
|
|
|
136
136
|
return tx;
|
|
137
137
|
}
|
|
138
138
|
|
|
139
|
-
async signIntentsWithAuth(domain: string, intents?: Record<string, unknown>[]) {
|
|
140
|
-
const address = this.wallet.account?.address;
|
|
141
|
-
if (!address) throw new Error("Wallet not connected");
|
|
142
|
-
|
|
143
|
-
const seed = hex.encode(window.crypto.getRandomValues(new Uint8Array(32)));
|
|
144
|
-
const msgBuffer = new TextEncoder().encode(`${domain}_${seed}`);
|
|
145
|
-
const nonce = await window.crypto.subtle.digest("SHA-256", new Uint8Array(msgBuffer));
|
|
146
|
-
|
|
147
|
-
return {
|
|
148
|
-
signed: await this.signIntents(intents || [], { nonce: new Uint8Array(nonce) }),
|
|
149
|
-
publicKey: `ed25519:${this.publicKey}`,
|
|
150
|
-
chainId: WalletType.TON,
|
|
151
|
-
address: address,
|
|
152
|
-
seed,
|
|
153
|
-
};
|
|
154
|
-
}
|
|
155
|
-
|
|
156
139
|
async signIntents(intents: Record<string, unknown>[], options?: { deadline?: number; nonce?: Uint8Array }) {
|
|
157
140
|
if (!this.wallet.signData) throw "Not impl";
|
|
158
141
|
const nonce = new Uint8Array(options?.nonce || window.crypto.getRandomValues(new Uint8Array(32)));
|
|
@@ -74,6 +74,11 @@ export const Bridge = observer(({ hot, widget, setup, onClose, onProcess, onSele
|
|
|
74
74
|
return hot.wallets.find((w) => w.type === from.type);
|
|
75
75
|
});
|
|
76
76
|
|
|
77
|
+
useEffect(() => {
|
|
78
|
+
if (from.type === WalletType.OMNI) setSender(hot.priorityWallet);
|
|
79
|
+
if (to.type === WalletType.OMNI) setRecipient(Recipient.fromWallet(hot.priorityWallet!));
|
|
80
|
+
}, [hot.priorityWallet]);
|
|
81
|
+
|
|
77
82
|
const [recipient, setRecipient] = useState<Recipient | undefined>(() => {
|
|
78
83
|
if (setup?.recipient) return setup.recipient;
|
|
79
84
|
if (to.type === WalletType.OMNI) return Recipient.fromWallet(hot.priorityWallet!);
|
|
@@ -267,7 +272,7 @@ export const Bridge = observer(({ hot, widget, setup, onClose, onProcess, onSele
|
|
|
267
272
|
<div style={{ display: "flex", alignItems: "center", gap: 8 }}>
|
|
268
273
|
<p style={{ fontWeight: "bold" }}>{from.chain === -4 ? "Withdraw HEX from:" : "Send from:"}</p>
|
|
269
274
|
<BadgeButton onClick={() => openSelectSender({ hot, type: from.type, onSelect: (wallet) => setSender(wallet) })}>
|
|
270
|
-
<p>{formatter.truncateAddress(sender === "qr" ? "QR code" : sender?.address ?? "
|
|
275
|
+
<p>{formatter.truncateAddress(sender === "qr" ? "QR code" : sender?.address ?? "Select sender")}</p>
|
|
271
276
|
</BadgeButton>
|
|
272
277
|
</div>
|
|
273
278
|
</div>
|