File tree Expand file tree Collapse file tree
providers/bitcoin/ui/send-transaction
views/verify-send-from-spark-transaction Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -31,8 +31,8 @@ export async function sendFromSparkAddress(
3131 to : string ,
3232 amount : string ,
3333 subtractFee = false
34- ) {
35- return await callRPC < string [ ] > ( "spendspark" , [
34+ ) : Promise < string > {
35+ return await callRPC < string > ( "spendspark" , [
3636 {
3737 [ to ] : {
3838 amount : Number ( amount ) ,
Original file line number Diff line number Diff line change 99 />
1010
1111 <div
12- v-if ="
13- !!accountInfo.sparkAccount &&
14- (network.name === NetworkNames.Firo ||
15- network.name === NetworkNames.FiroTest)
16- "
12+ v-if =" !!accountInfo.sparkAccount && network.name === NetworkNames.Firo"
1713 class =" send-transaction__tabs"
1814 >
1915 <button
Original file line number Diff line number Diff line change 2424
2525 <div class =" form__container-send-input" >
2626 <send-spark-address-input
27+ v-if =" network.name === 'Firo'"
28+ ref =" addressInputTo"
29+ class =" no-margin"
30+ title =" To address"
31+ :value =" addressTo"
32+ :network =" (network as BitcoinNetwork)"
33+ @update:input-address =" inputAddressTo"
34+ @toggle:show-contacts =" toggleSelectContactTo"
35+ />
36+ <send-address-input
37+ v-if =" network.name !== 'Firo'"
2738 ref =" addressInputTo"
2839 class =" no-margin"
2940 title =" To address"
Original file line number Diff line number Diff line change @@ -295,10 +295,7 @@ const generateNewSparkAddress = async () => {
295295 }
296296};
297297const getSparkAccountState = async (network : BaseNetwork ) => {
298- if (
299- network .name === NetworkNames .Firo ||
300- network .name === NetworkNames .FiroTest
301- ) {
298+ if (network .name === NetworkNames .Firo ) {
302299 const sparkAccountResponse = await getSparkState ();
303300 accountHeaderData .value .sparkAccount = { ... sparkAccountResponse };
304301 }
@@ -325,10 +322,7 @@ const setNetwork = async (network: BaseNetwork) => {
325322
326323 let sparkAccount: SparkAccount | null = null ;
327324
328- if (
329- network .name === NetworkNames .Firo ||
330- network .name === NetworkNames .FiroTest
331- ) {
325+ if (network .name === NetworkNames .Firo ) {
332326 const sparkAccountResponse = await getSparkState ();
333327 sparkAccount = { ... sparkAccountResponse };
334328 }
Original file line number Diff line number Diff line change @@ -147,15 +147,30 @@ const sendAction = async () => {
147147 value: txData .toToken .amount ,
148148 transactionHash: " " ,
149149 };
150+
150151 const activityState = new ActivityState ();
152+
151153 await sendFromSparkAddress (
152154 txData .toAddress ,
153155 fromBase (txData .toToken .amount , txData .toToken .decimals ).toString ()
154156 )
155- .then (() => {
157+ .then ((res ) => {
156158 trackSendEvents (SendEventType .SendComplete , {
157159 network: network .value .name ,
158160 });
161+ activityState .addActivities (
162+ [
163+ {
164+ ... txActivity ,
165+ ... { transactionHash: res },
166+ },
167+ ],
168+ {
169+ address: network .value .displayAddress (txData .fromAddress ),
170+ network: network .value .name ,
171+ }
172+ );
173+
159174 isSendDone .value = true ;
160175 if (getCurrentContext () === " popup" ) {
161176 setTimeout (() => {
You can’t perform that action at this time.
0 commit comments